Version Description
- Removed metaboxer code & files, which are no longer used
- Merged the metabox list jQuery functionality
- Removed ajax.php file
- Removed image navigation & buttons. Replaced with icon fonts
- Added type & mode filters to edit screen
- Added option to add aquick edit link to tickers for admins/editors
Download this release
Release Info
Developer | metaphorcreations |
Plugin | Ditty News Ticker |
Version | 1.4.5 |
Comparing to | |
See all releases |
Code changes from version 1.4.4 to 1.4.5
- assets/css/style-admin.css +13 -3
- assets/css/style.css +57 -26
- assets/fontastic/fonts/ditty-news-ticker.eot +0 -0
- assets/fontastic/fonts/ditty-news-ticker.svg +9 -5
- assets/fontastic/fonts/ditty-news-ticker.ttf +0 -0
- assets/fontastic/fonts/ditty-news-ticker.woff +0 -0
- assets/fontastic/icons-reference.html +34 -2
- assets/fontastic/styles.css +12 -0
- assets/images/admin/arrow-resize-090.png +0 -0
- assets/images/admin/minus-circle.png +0 -0
- assets/images/admin/plus-circle.png +0 -0
- assets/images/button.png +0 -0
- assets/images/button@2x.png +0 -0
- assets/images/navarrows.png +0 -0
- assets/images/navarrows@2x.png +0 -0
- assets/js/script-admin.js +22 -88
- ditty-news-ticker.php +4 -7
- includes/ajax.php +0 -48
- includes/edit-columns.php +74 -45
- includes/filters.php +23 -5
- includes/functions.php +1 -1
- includes/meta-boxes.php +19 -16
- includes/metaboxer/images/arrow-resize-090.png +0 -0
- includes/metaboxer/images/attachment-audio.png +0 -0
- includes/metaboxer/images/attachment-delete.png +0 -0
- includes/metaboxer/images/attachment-image.png +0 -0
- includes/metaboxer/images/attachment-preview.png +0 -0
- includes/metaboxer/images/attachment-settings.png +0 -0
- includes/metaboxer/images/attachment-video.png +0 -0
- includes/metaboxer/images/attachment-vimeo.png +0 -0
- includes/metaboxer/images/attachment-youtube.png +0 -0
- includes/metaboxer/images/minus-circle.png +0 -0
- includes/metaboxer/images/plus-circle.png +0 -0
- includes/metaboxer/metaboxer-class.php +0 -186
- includes/metaboxer/metaboxer.css +0 -349
- includes/metaboxer/metaboxer.js +0 -426
- includes/metaboxer/metaboxer.php +0 -759
- includes/scripts.php +2 -11
- includes/settings.php +21 -57
- languages/ditty-news-ticker-en_US.mo +0 -0
- languages/ditty-news-ticker-en_US.po +215 -200
- readme.txt +9 -1
assets/css/style-admin.css
CHANGED
@@ -423,15 +423,25 @@ p.mtphr-dnt-side-label {
|
|
423 |
.mtphr-dnt-default-nofollow {
|
424 |
width: 1px;
|
425 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
|
427 |
|
428 |
/* --------------------------------------------------------- */
|
429 |
/* !Mixed list */
|
430 |
/* --------------------------------------------------------- */
|
431 |
|
432 |
-
#mtphr-dnt-mixed-add-tick {
|
433 |
-
margin: 10px 0 10px;
|
434 |
-
}
|
435 |
.mtphr-dnt-mixed-list input[type="number"] {
|
436 |
width: 60px;
|
437 |
}
|
423 |
.mtphr-dnt-default-nofollow {
|
424 |
width: 1px;
|
425 |
}
|
426 |
+
.mtphr-dnt-notice {
|
427 |
+
font-weight: normal;
|
428 |
+
font-style: italic;
|
429 |
+
background: #f5f5f5;
|
430 |
+
border-left: 4px solid #7ad03a;
|
431 |
+
padding: 7px 10px;
|
432 |
+
margin: 4px 0;
|
433 |
+
}
|
434 |
+
.mtphr-dnt-default-list .mtphr-dnt-list-handle span,
|
435 |
+
.mtphr-dnt-default-list .mtphr-dnt-list-delete a,
|
436 |
+
.mtphr-dnt-default-list .mtphr-dnt-list-add a {
|
437 |
+
margin-top: 2px;
|
438 |
+
}
|
439 |
|
440 |
|
441 |
/* --------------------------------------------------------- */
|
442 |
/* !Mixed list */
|
443 |
/* --------------------------------------------------------- */
|
444 |
|
|
|
|
|
|
|
445 |
.mtphr-dnt-mixed-list input[type="number"] {
|
446 |
width: 60px;
|
447 |
}
|
assets/css/style.css
CHANGED
@@ -73,14 +73,19 @@
|
|
73 |
|
74 |
/* Directional nav
|
75 |
------------------------------------------------------------ */
|
76 |
-
.mtphr-dnt-nav {
|
77 |
position: absolute;
|
78 |
top: 50%;
|
79 |
margin-top: -19px;
|
|
|
|
|
|
|
80 |
width: 38px;
|
81 |
height: 38px;
|
82 |
-
|
83 |
-
|
|
|
|
|
84 |
}
|
85 |
.mtphr-dnt-nav:hover {
|
86 |
text-decoration: none !important;
|
@@ -117,23 +122,67 @@
|
|
117 |
}
|
118 |
.mtphr-dnt-control-button {
|
119 |
display: inline-block;
|
|
|
|
|
|
|
|
|
120 |
width: 18px;
|
121 |
height: 18px;
|
122 |
-
|
123 |
-
|
|
|
124 |
margin: 0 2px;
|
125 |
-
text-indent: -9999px;
|
126 |
}
|
127 |
.mtphr-dnt-control-button:hover {
|
128 |
text-decoration: none !important;
|
129 |
}
|
130 |
-
.mtphr-dnt-control-button.active {
|
131 |
-
|
132 |
}
|
133 |
.mtphr-dnt-control-button:focus {
|
134 |
outline: none;
|
135 |
}
|
136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
/* --------------------------------------------------------- */
|
138 |
/* !Paging */
|
139 |
/* --------------------------------------------------------- */
|
@@ -175,24 +224,6 @@
|
|
175 |
clear: both;
|
176 |
}
|
177 |
|
178 |
-
/* Retina displays
|
179 |
-
------------------------------------------------------------ */
|
180 |
-
|
181 |
-
@media only screen and (-Webkit-min-device-pixel-ratio: 1.5),
|
182 |
-
only screen and (-moz-min-device-pixel-ratio: 1.5),
|
183 |
-
only screen and (-o-min-device-pixel-ratio: 3/2),
|
184 |
-
only screen and (min-device-pixel-ratio: 1.5) {
|
185 |
-
|
186 |
-
.mtphr-dnt-nav {
|
187 |
-
background-image: url(../images/navarrows@2x.png);
|
188 |
-
}
|
189 |
-
.mtphr-dnt-control-button {
|
190 |
-
background-image: url(../images/button@2x.png);
|
191 |
-
}
|
192 |
-
}
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
|
197 |
/**
|
198 |
* Default styles
|
73 |
|
74 |
/* Directional nav
|
75 |
------------------------------------------------------------ */
|
76 |
+
.mtphr-dnt .mtphr-dnt-nav {
|
77 |
position: absolute;
|
78 |
top: 50%;
|
79 |
margin-top: -19px;
|
80 |
+
}
|
81 |
+
.mtphr-dnt-nav i {
|
82 |
+
display: block;
|
83 |
width: 38px;
|
84 |
height: 38px;
|
85 |
+
font-size: 38px;
|
86 |
+
line-height: 38px;
|
87 |
+
color: #DDD;
|
88 |
+
color: rgba(221, 221, 221, .8);
|
89 |
}
|
90 |
.mtphr-dnt-nav:hover {
|
91 |
text-decoration: none !important;
|
122 |
}
|
123 |
.mtphr-dnt-control-button {
|
124 |
display: inline-block;
|
125 |
+
margin: 0 2px;
|
126 |
+
}
|
127 |
+
.mtphr-dnt-control-button i {
|
128 |
+
display: block;
|
129 |
width: 18px;
|
130 |
height: 18px;
|
131 |
+
font-size: 18px;
|
132 |
+
line-height: 18px;
|
133 |
+
color: #CCC;
|
134 |
margin: 0 2px;
|
|
|
135 |
}
|
136 |
.mtphr-dnt-control-button:hover {
|
137 |
text-decoration: none !important;
|
138 |
}
|
139 |
+
.mtphr-dnt-control-button.active i {
|
140 |
+
color: #777;
|
141 |
}
|
142 |
.mtphr-dnt-control-button:focus {
|
143 |
outline: none;
|
144 |
}
|
145 |
|
146 |
+
/* --------------------------------------------------------- */
|
147 |
+
/* !Edit link */
|
148 |
+
/* --------------------------------------------------------- */
|
149 |
+
|
150 |
+
.mtphr-dnt-edit-link {
|
151 |
+
position: absolute;
|
152 |
+
top: 0;
|
153 |
+
left: 0;
|
154 |
+
z-index: 999;
|
155 |
+
font-family: Arial, sans-serif !important;
|
156 |
+
font-size: 14px !important;
|
157 |
+
line-height: 16px !important;
|
158 |
+
color: #666;
|
159 |
+
background: #FFF;
|
160 |
+
padding: 6px 8px 4px 7px;
|
161 |
+
-webkit-border-radius: 5px;
|
162 |
+
-moz-border-radius: 5px;
|
163 |
+
border-radius: 5px;
|
164 |
+
filter: alpha(opacity=50);
|
165 |
+
-moz-opacity: .5;
|
166 |
+
-khtml-opacity: .5;
|
167 |
+
opacity: .5;
|
168 |
+
-webkit-transition: opacity .2s linear;
|
169 |
+
-moz-transition: opacity .2s linear;
|
170 |
+
-o-transition: opacity .2s linear;
|
171 |
+
transition: opacity .2s linear;
|
172 |
+
}
|
173 |
+
.mtphr-dnt-edit-link:hover {
|
174 |
+
color: #666;
|
175 |
+
filter: alpha(opacity=100);
|
176 |
+
-moz-opacity: 1;
|
177 |
+
-khtml-opacity: 1;
|
178 |
+
opacity: 1;
|
179 |
+
}
|
180 |
+
.mtphr-dnt-edit-link i {
|
181 |
+
float: left;
|
182 |
+
display: block;
|
183 |
+
margin: 1px 3px 0 0;
|
184 |
+
}
|
185 |
+
|
186 |
/* --------------------------------------------------------- */
|
187 |
/* !Paging */
|
188 |
/* --------------------------------------------------------- */
|
224 |
clear: both;
|
225 |
}
|
226 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
|
228 |
/**
|
229 |
* Default styles
|
assets/fontastic/fonts/ditty-news-ticker.eot
CHANGED
Binary file
|
assets/fontastic/fonts/ditty-news-ticker.svg
CHANGED
@@ -7,9 +7,13 @@
|
|
7 |
<font-face font-family="ditty-news-ticker" units-per-em="512" ascent="480" descent="-32"/>
|
8 |
<missing-glyph horiz-adv-x="512" />
|
9 |
|
10 |
-
<glyph unicode="a" d="M325 512l-138 0c-103 0-187-86-187-
|
11 |
-
<glyph unicode="b" d="M288 352l64
|
12 |
-
<glyph unicode="c" d="M240 416c-97 0-176-79-176-
|
13 |
-
<glyph unicode="d" d="M240 416c-97 0-176-79-176-
|
14 |
-
<glyph unicode="e" d="M75 75c-48 48-75 113-75
|
|
|
|
|
|
|
|
|
15 |
</font></defs></svg>
|
7 |
<font-face font-family="ditty-news-ticker" units-per-em="512" ascent="480" descent="-32"/>
|
8 |
<missing-glyph horiz-adv-x="512" />
|
9 |
|
10 |
+
<glyph unicode="a" d="M325 512l-138 0c-103 0-187-86-187-192 0-97 70-176 160-190l0-130 0 0 128 128 37 0c103 0 187 86 187 192 0 106-84 192-187 192z m-197-240c-26 0-48 22-48 48 0 26 22 48 48 48 26 0 48-22 48-48 0-26-22-48-48-48z m128 0c-26 0-48 22-48 48 0 26 22 48 48 48 26 0 48-22 48-48 0-26-22-48-48-48z m128 0c-26 0-48 22-48 48 0 26 22 48 48 48 26 0 48-22 48-48 0-26-22-48-48-48z"/>
|
11 |
+
<glyph unicode="b" d="M288 352l64 0-112 128-112-128 64 0 0-192-64 0 112-128 112 128-64 0z"/>
|
12 |
+
<glyph unicode="c" d="M240 416c-97 0-176-79-176-176 0-97 79-176 176-176 97 0 176 79 176 176 0 97-79 176-176 176z m112-208l-80 0 0-80-64 0 0 80-80 0 0 64 80 0 0 80 64 0 0-80 80 0z"/>
|
13 |
+
<glyph unicode="d" d="M240 416c-97 0-176-79-176-176 0-97 79-176 176-176 97 0 176 79 176 176 0 97-79 176-176 176z m112-208l-224 0 0 64 224 0z"/>
|
14 |
+
<glyph unicode="e" d="M75 75c-48 48-75 113-75 181 0 141 115 256 256 256l32-32-32-32c-106 0-192-86-192-192 0-51 20-100 56-136l-39-5z m181-75l-32 32 32 32c106 0 192 86 192 192 0 51-20 100-56 136l39 5 6 40c48-48 75-113 75-181 0-141-115-256-256-256z"/>
|
15 |
+
<glyph unicode="f" d="M256 0c141 0 256 115 256 256 0 141-115 256-256 256-141 0-256-115-256-256 0-141 115-256 256-256z m0 384l0-96 128 0 0-64-128 0 0-96-128 128z"/>
|
16 |
+
<glyph unicode="g" d="M256 512c-141 0-256-115-256-256 0-141 115-256 256-256 141 0 256 115 256 256 0 141-115 256-256 256z m0-384l0 96-128 0 0 64 128 0 0 96 128-128z"/>
|
17 |
+
<glyph unicode="h" d="M475 256c0-40-9-77-29-110-20-34-46-60-80-80-33-20-70-29-110-29-40 0-77 9-110 29-34 20-60 46-80 80-20 33-29 70-29 110 0 40 9 77 29 110 20 34 46 60 80 80 33 20 70 29 110 29 40 0 77-9 110-29 34-20 60-46 80-80 20-33 29-70 29-110z"/>
|
18 |
+
<glyph unicode="i" d="M329 256c0 20-7 37-21 52-15 14-32 21-52 21-20 0-37-7-52-21-14-15-21-32-21-52 0-20 7-37 21-52 15-14 32-21 52-21 20 0 37 7 52 21 14 15 21 32 21 52z m146 31l0-63c0-3 0-5-2-7-1-2-3-3-6-4l-52-8c-4-10-8-19-12-26 7-9 17-22 31-39 2-2 3-5 3-7 0-3-1-5-3-7-5-7-14-17-28-31-14-13-23-20-27-20-2 0-5 1-7 3l-40 31c-8-5-17-8-26-11-3-26-6-44-8-53-1-6-5-8-10-8l-64 0c-2 0-5 0-7 2-2 2-3 4-3 6l-8 53c-9 3-18 6-26 10l-40-30c-2-2-4-3-7-3-3 0-5 1-7 3-24 22-40 38-47 48-2 2-2 4-2 7 0 2 0 4 2 6 3 4 8 11 14 19 7 9 12 16 16 21-5 9-9 19-12 28l-52 8c-3 0-5 1-6 3-2 2-2 4-2 7l0 63c0 3 0 5 2 7 1 2 3 3 5 4l53 8c3 8 7 17 12 26-8 11-18 24-31 39-2 3-3 5-3 7 0 2 1 4 3 7 5 7 14 17 28 30 14 14 23 21 27 21 2 0 5-1 7-3l40-31c8 5 17 8 26 11 3 26 6 44 8 53 1 6 5 8 10 8l64 0c2 0 5 0 7-2 2-2 3-4 3-6l8-53c9-3 18-6 26-10l40 30c2 2 4 3 7 3 3 0 5-1 7-3 25-23 41-39 47-49 2-1 2-3 2-6 0-2 0-4-2-6-3-4-8-11-14-19-7-9-12-16-16-21 5-9 9-18 12-28l52-8c3 0 5-1 6-3 2-2 2-4 2-7z"/>
|
19 |
</font></defs></svg>
|
assets/fontastic/fonts/ditty-news-ticker.ttf
CHANGED
Binary file
|
assets/fontastic/fonts/ditty-news-ticker.woff
CHANGED
Binary file
|
assets/fontastic/icons-reference.html
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
<meta charset="utf-8">
|
5 |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
6 |
<meta name="viewport" content="width=device-width,initial-scale=1">
|
7 |
-
<title>Font Reference - Ditty News Ticker
|
8 |
<link href="http://fonts.googleapis.com/css?family=Dosis:400,500,700" rel="stylesheet" type="text/css">
|
9 |
<link rel="stylesheet" href="styles.css">
|
10 |
<style type="text/css">
|
@@ -42,7 +42,7 @@ h2{font-size:18px;padding:0 0 21px 5px;margin:45px 0 0 0;text-transform:uppercas
|
|
42 |
<body>
|
43 |
<div class="container">
|
44 |
<h1>Ditty News Ticker</h1>
|
45 |
-
<p class="small">This font was created with
|
46 |
<h2>Character mapping</h2>
|
47 |
<ul class="glyphs character-mapping">
|
48 |
<li>
|
@@ -65,6 +65,22 @@ h2{font-size:18px;padding:0 0 21px 5px;margin:45px 0 0 0;text-transform:uppercas
|
|
65 |
<div data-icon="e" class="icon"></div>
|
66 |
<input type="text" readonly="readonly" value="e">
|
67 |
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
</ul>
|
69 |
<h2>CSS mapping</h2>
|
70 |
<ul class="glyphs css-mapping">
|
@@ -88,6 +104,22 @@ h2{font-size:18px;padding:0 0 21px 5px;margin:45px 0 0 0;text-transform:uppercas
|
|
88 |
<div class="icon mtphr-dnt-icon-spinner"></div>
|
89 |
<input type="text" readonly="readonly" value="spinner">
|
90 |
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
</ul>
|
92 |
</div><script type="text/javascript">
|
93 |
(function() {
|
4 |
<meta charset="utf-8">
|
5 |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
6 |
<meta name="viewport" content="width=device-width,initial-scale=1">
|
7 |
+
<title>Font Reference - Ditty News Ticker</title>
|
8 |
<link href="http://fonts.googleapis.com/css?family=Dosis:400,500,700" rel="stylesheet" type="text/css">
|
9 |
<link rel="stylesheet" href="styles.css">
|
10 |
<style type="text/css">
|
42 |
<body>
|
43 |
<div class="container">
|
44 |
<h1>Ditty News Ticker</h1>
|
45 |
+
<p class="small">This font was created with<a href="http://fontastic.me/">Fontastic</a></p>
|
46 |
<h2>Character mapping</h2>
|
47 |
<ul class="glyphs character-mapping">
|
48 |
<li>
|
65 |
<div data-icon="e" class="icon"></div>
|
66 |
<input type="text" readonly="readonly" value="e">
|
67 |
</li>
|
68 |
+
<li>
|
69 |
+
<div data-icon="f" class="icon"></div>
|
70 |
+
<input type="text" readonly="readonly" value="f">
|
71 |
+
</li>
|
72 |
+
<li>
|
73 |
+
<div data-icon="g" class="icon"></div>
|
74 |
+
<input type="text" readonly="readonly" value="g">
|
75 |
+
</li>
|
76 |
+
<li>
|
77 |
+
<div data-icon="h" class="icon"></div>
|
78 |
+
<input type="text" readonly="readonly" value="h">
|
79 |
+
</li>
|
80 |
+
<li>
|
81 |
+
<div data-icon="i" class="icon"></div>
|
82 |
+
<input type="text" readonly="readonly" value="i">
|
83 |
+
</li>
|
84 |
</ul>
|
85 |
<h2>CSS mapping</h2>
|
86 |
<ul class="glyphs css-mapping">
|
104 |
<div class="icon mtphr-dnt-icon-spinner"></div>
|
105 |
<input type="text" readonly="readonly" value="spinner">
|
106 |
</li>
|
107 |
+
<li>
|
108 |
+
<div class="icon mtphr-dnt-icon-arrow-left"></div>
|
109 |
+
<input type="text" readonly="readonly" value="arrow-left">
|
110 |
+
</li>
|
111 |
+
<li>
|
112 |
+
<div class="icon mtphr-dnt-icon-arrow-right"></div>
|
113 |
+
<input type="text" readonly="readonly" value="arrow-right">
|
114 |
+
</li>
|
115 |
+
<li>
|
116 |
+
<div class="icon mtphr-dnt-icon-button"></div>
|
117 |
+
<input type="text" readonly="readonly" value="button">
|
118 |
+
</li>
|
119 |
+
<li>
|
120 |
+
<div class="icon mtphr-dnt-icon-gear"></div>
|
121 |
+
<input type="text" readonly="readonly" value="gear">
|
122 |
+
</li>
|
123 |
</ul>
|
124 |
</div><script type="text/javascript">
|
125 |
(function() {
|
assets/fontastic/styles.css
CHANGED
@@ -53,3 +53,15 @@
|
|
53 |
.mtphr-dnt-icon-spinner:before {
|
54 |
content: "e";
|
55 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
.mtphr-dnt-icon-spinner:before {
|
54 |
content: "e";
|
55 |
}
|
56 |
+
.mtphr-dnt-icon-arrow-left:before {
|
57 |
+
content: "f";
|
58 |
+
}
|
59 |
+
.mtphr-dnt-icon-arrow-right:before {
|
60 |
+
content: "g";
|
61 |
+
}
|
62 |
+
.mtphr-dnt-icon-button:before {
|
63 |
+
content: "h";
|
64 |
+
}
|
65 |
+
.mtphr-dnt-icon-gear:before {
|
66 |
+
content: "i";
|
67 |
+
}
|
assets/images/admin/arrow-resize-090.png
DELETED
Binary file
|
assets/images/admin/minus-circle.png
DELETED
Binary file
|
assets/images/admin/plus-circle.png
DELETED
Binary file
|
assets/images/button.png
DELETED
Binary file
|
assets/images/button@2x.png
DELETED
Binary file
|
assets/images/navarrows.png
DELETED
Binary file
|
assets/images/navarrows@2x.png
DELETED
Binary file
|
assets/js/script-admin.js
CHANGED
@@ -150,12 +150,16 @@ jQuery( document ).ready( function($) {
|
|
150 |
|
151 |
|
152 |
/* --------------------------------------------------------- */
|
153 |
-
/* !Advanced list - 1.4.
|
154 |
/* --------------------------------------------------------- */
|
155 |
|
156 |
if( $('.mtphr-dnt-advanced-list').length > 0 ) {
|
157 |
-
|
158 |
function mtphr_dnt_advanced_handle_toggle( $table ) {
|
|
|
|
|
|
|
|
|
159 |
if( $table.find('.mtphr-dnt-list-item').length > 1 ) {
|
160 |
$table.find('.mtphr-dnt-list-handle').show();
|
161 |
$table.find('.mtphr-dnt-list-delete').show();
|
@@ -169,10 +173,19 @@ jQuery( document ).ready( function($) {
|
|
169 |
|
170 |
$table.find('.mtphr-dnt-list-item').each( function(index) {
|
171 |
$(this).find('textarea, input, select').each( function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
|
173 |
-
var name = $(this).attr('data-name'),
|
174 |
-
key = $(this).attr('data-key');
|
175 |
-
|
176 |
$(this).attr('name', name+'['+index+']['+key+']');
|
177 |
});
|
178 |
});
|
@@ -192,7 +205,7 @@ jQuery( document ).ready( function($) {
|
|
192 |
$(this).height($originals.eq(index).height());
|
193 |
});
|
194 |
return $helper;
|
195 |
-
}
|
196 |
});
|
197 |
|
198 |
// Delete list item
|
@@ -236,94 +249,14 @@ jQuery( document ).ready( function($) {
|
|
236 |
});
|
237 |
}
|
238 |
|
239 |
-
|
240 |
-
|
241 |
-
/* --------------------------------------------------------- */
|
242 |
-
/* !Default tick list - 1.4.0 */
|
243 |
-
/* --------------------------------------------------------- */
|
244 |
-
|
245 |
-
if( $('.mtphr-dnt-default-list').length > 0 ) {
|
246 |
-
|
247 |
-
function mtphr_dnt_default_handle_toggle( $table ) {
|
248 |
-
if( $table.find('.mtphr-dnt-list-item').length > 1 ) {
|
249 |
-
$table.find('.mtphr-dnt-list-handle').show();
|
250 |
-
} else {
|
251 |
-
$table.find('.mtphr-dnt-list-handle').hide();
|
252 |
-
}
|
253 |
-
}
|
254 |
-
|
255 |
-
function mtphr_dnt_default_set_order( $table ) {
|
256 |
-
|
257 |
-
$table.find('.mtphr-dnt-list-item').each( function(index) {
|
258 |
-
$(this).find('textarea, input, select').each( function() {
|
259 |
-
if( $(this).hasClass('wp-editor-area') ) {
|
260 |
-
$(this).attr('name', '_mtphr_dnt_ticks['+index+'][tick]');
|
261 |
-
} else {
|
262 |
-
$(this).attr('name', '_mtphr_dnt_ticks['+index+']['+$(this).attr('key')+']');
|
263 |
-
}
|
264 |
-
});
|
265 |
-
});
|
266 |
-
|
267 |
-
mtphr_dnt_default_handle_toggle( $table );
|
268 |
-
}
|
269 |
-
|
270 |
-
$('.mtphr-dnt-default-list').sortable( {
|
271 |
-
handle: '.mtphr-dnt-list-handle',
|
272 |
-
items: '.mtphr-dnt-list-item',
|
273 |
-
axis: 'y',
|
274 |
-
helper: function(e, tr) {
|
275 |
-
var $originals = tr.children();
|
276 |
-
var $helper = tr.clone();
|
277 |
-
$helper.children().each(function(index) {
|
278 |
-
$(this).width($originals.eq(index).width());
|
279 |
-
$(this).height($originals.eq(index).height());
|
280 |
-
});
|
281 |
-
return $helper;
|
282 |
-
},
|
283 |
-
});
|
284 |
-
|
285 |
-
// Delete list item
|
286 |
-
$('.mtphr-dnt-default-list').find('.mtphr-dnt-list-delete').live( 'click', function(e) {
|
287 |
-
e.preventDefault();
|
288 |
-
|
289 |
-
// Fade out the item
|
290 |
-
$(this).parents('.mtphr-dnt-list-item').fadeOut( function() {
|
291 |
-
$(this).remove();
|
292 |
-
});
|
293 |
-
});
|
294 |
-
|
295 |
-
// Add new row
|
296 |
-
$('.mtphr-dnt-default-list').find('.mtphr-dnt-list-add').live( 'click', function(e) {
|
297 |
-
e.preventDefault();
|
298 |
-
|
299 |
-
// Save the container
|
300 |
-
var $table = $(this).parents('.mtphr-dnt-default-list'),
|
301 |
-
$container = $(this).parents('.mtphr-dnt-list-item');
|
302 |
-
|
303 |
-
var data = {
|
304 |
-
action: 'mtphr_dnt_default_list_ajax',
|
305 |
-
security: ditty_news_ticker_vars.security
|
306 |
-
};
|
307 |
-
$.post( ajaxurl, data, function( response ) {
|
308 |
-
|
309 |
-
// Add the audio and adjust the toggles
|
310 |
-
$container.after( response );
|
311 |
-
mtphr_dnt_default_set_order( $table );
|
312 |
-
});
|
313 |
-
});
|
314 |
-
|
315 |
-
$('.mtphr-dnt-default-list').each( function(index) {
|
316 |
-
mtphr_dnt_default_set_order( $(this) );
|
317 |
-
});
|
318 |
-
}
|
319 |
-
|
320 |
|
321 |
|
322 |
/* --------------------------------------------------------- */
|
323 |
/* !Mixed tick list - 1.3.3 */
|
324 |
/* --------------------------------------------------------- */
|
325 |
|
326 |
-
|
|
|
327 |
|
328 |
function mtphr_dnt_mixed_handle_toggle( $table ) {
|
329 |
if( $table.find('.mtphr-dnt-list-item').length > 1 ) {
|
@@ -396,5 +329,6 @@ jQuery( document ).ready( function($) {
|
|
396 |
mtphr_dnt_mixed_set_order( $(this) );
|
397 |
});
|
398 |
}
|
|
|
399 |
|
400 |
});
|
150 |
|
151 |
|
152 |
/* --------------------------------------------------------- */
|
153 |
+
/* !Advanced list - 1.4.5 */
|
154 |
/* --------------------------------------------------------- */
|
155 |
|
156 |
if( $('.mtphr-dnt-advanced-list').length > 0 ) {
|
157 |
+
|
158 |
function mtphr_dnt_advanced_handle_toggle( $table ) {
|
159 |
+
|
160 |
+
console.log($table[0]);
|
161 |
+
console.log($table.find('.mtphr-dnt-list-item').length);
|
162 |
+
|
163 |
if( $table.find('.mtphr-dnt-list-item').length > 1 ) {
|
164 |
$table.find('.mtphr-dnt-list-handle').show();
|
165 |
$table.find('.mtphr-dnt-list-delete').show();
|
173 |
|
174 |
$table.find('.mtphr-dnt-list-item').each( function(index) {
|
175 |
$(this).find('textarea, input, select').each( function() {
|
176 |
+
|
177 |
+
if( $(this).hasClass('mtphr-dnt-wysiwyg') ) {
|
178 |
+
|
179 |
+
var $parent = $(this).parents('.mtphr-dnt-wysiwyg-container'),
|
180 |
+
name = $parent.attr('data-name'),
|
181 |
+
key = $parent.attr('data-key');
|
182 |
+
|
183 |
+
} else {
|
184 |
+
|
185 |
+
var name = $(this).attr('data-name'),
|
186 |
+
key = $(this).attr('data-key');
|
187 |
+
}
|
188 |
|
|
|
|
|
|
|
189 |
$(this).attr('name', name+'['+index+']['+key+']');
|
190 |
});
|
191 |
});
|
205 |
$(this).height($originals.eq(index).height());
|
206 |
});
|
207 |
return $helper;
|
208 |
+
}
|
209 |
});
|
210 |
|
211 |
// Delete list item
|
249 |
});
|
250 |
}
|
251 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
|
253 |
|
254 |
/* --------------------------------------------------------- */
|
255 |
/* !Mixed tick list - 1.3.3 */
|
256 |
/* --------------------------------------------------------- */
|
257 |
|
258 |
+
/*
|
259 |
+
if( $('.mtphr-dnt-mixed-list').length > 0 ) {
|
260 |
|
261 |
function mtphr_dnt_mixed_handle_toggle( $table ) {
|
262 |
if( $table.find('.mtphr-dnt-list-item').length > 1 ) {
|
329 |
mtphr_dnt_mixed_set_order( $(this) );
|
330 |
});
|
331 |
}
|
332 |
+
*/
|
333 |
|
334 |
});
|
ditty-news-ticker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Ditty News Ticker
|
4 |
Plugin URI: http://dittynewsticker.com/
|
5 |
Description: Ditty News Ticker is a multi-functional data display plugin
|
6 |
-
Version: 1.4.
|
7 |
Author: Metaphor Creations
|
8 |
Author URI: http://www.metaphorcreations.com
|
9 |
License: GPL2
|
@@ -31,12 +31,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
31 |
/**
|
32 |
* Define constants
|
33 |
*
|
34 |
-
* @since 1.4.
|
35 |
*/
|
36 |
if ( WP_DEBUG ) {
|
37 |
-
define ( 'MTPHR_DNT_VERSION', '1.4.
|
38 |
} else {
|
39 |
-
define ( 'MTPHR_DNT_VERSION', '1.4.
|
40 |
}
|
41 |
define ( 'MTPHR_DNT_DIR', plugin_dir_path(__FILE__) );
|
42 |
define ( 'MTPHR_DNT_URL', plugins_url().'/ditty-news-ticker' );
|
@@ -53,12 +53,9 @@ define ( 'MTPHR_DNT_URL', plugins_url().'/ditty-news-ticker' );
|
|
53 |
if( is_admin() ) {
|
54 |
|
55 |
// Load admin code
|
56 |
-
require_once( MTPHR_DNT_DIR.'includes/metaboxer/metaboxer.php' );
|
57 |
-
require_once( MTPHR_DNT_DIR.'includes/metaboxer/metaboxer-class.php' );
|
58 |
require_once( MTPHR_DNT_DIR.'includes/meta-boxes.php' );
|
59 |
//require_once( MTPHR_DNT_DIR.'includes/help.php' );
|
60 |
require_once( MTPHR_DNT_DIR.'includes/edit-columns.php' );
|
61 |
-
require_once( MTPHR_DNT_DIR.'includes/ajax.php' );
|
62 |
}
|
63 |
|
64 |
// Load the general functions
|
3 |
Plugin Name: Ditty News Ticker
|
4 |
Plugin URI: http://dittynewsticker.com/
|
5 |
Description: Ditty News Ticker is a multi-functional data display plugin
|
6 |
+
Version: 1.4.5
|
7 |
Author: Metaphor Creations
|
8 |
Author URI: http://www.metaphorcreations.com
|
9 |
License: GPL2
|
31 |
/**
|
32 |
* Define constants
|
33 |
*
|
34 |
+
* @since 1.4.5
|
35 |
*/
|
36 |
if ( WP_DEBUG ) {
|
37 |
+
define ( 'MTPHR_DNT_VERSION', '1.4.5-'.time() );
|
38 |
} else {
|
39 |
+
define ( 'MTPHR_DNT_VERSION', '1.4.5' );
|
40 |
}
|
41 |
define ( 'MTPHR_DNT_DIR', plugin_dir_path(__FILE__) );
|
42 |
define ( 'MTPHR_DNT_URL', plugins_url().'/ditty-news-ticker' );
|
53 |
if( is_admin() ) {
|
54 |
|
55 |
// Load admin code
|
|
|
|
|
56 |
require_once( MTPHR_DNT_DIR.'includes/meta-boxes.php' );
|
57 |
//require_once( MTPHR_DNT_DIR.'includes/help.php' );
|
58 |
require_once( MTPHR_DNT_DIR.'includes/edit-columns.php' );
|
|
|
59 |
}
|
60 |
|
61 |
// Load the general functions
|
includes/ajax.php
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
/* --------------------------------------------------------- */
|
5 |
-
/* !Display a default list item - 1.3.0 */
|
6 |
-
/* --------------------------------------------------------- */
|
7 |
-
|
8 |
-
function mtphr_dnt_default_list_ajax() {
|
9 |
-
|
10 |
-
// Get access to the database
|
11 |
-
global $wpdb;
|
12 |
-
|
13 |
-
// Check the nonce
|
14 |
-
check_ajax_referer( 'ditty-news-ticker', 'security' );
|
15 |
-
|
16 |
-
$settings = mtphr_dnt_general_settings();
|
17 |
-
|
18 |
-
// Display the field
|
19 |
-
mtphr_dnt_render_default_tick( $settings );
|
20 |
-
|
21 |
-
die(); // this is required to return a proper result
|
22 |
-
}
|
23 |
-
add_action( 'wp_ajax_mtphr_dnt_default_list_ajax', 'mtphr_dnt_default_list_ajax' );
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
/* --------------------------------------------------------- */
|
28 |
-
/* !Display a mixed list item - 1.3.3 */
|
29 |
-
/* --------------------------------------------------------- */
|
30 |
-
|
31 |
-
function mtphr_dnt_mixed_list_ajax() {
|
32 |
-
|
33 |
-
// Get access to the database
|
34 |
-
global $wpdb;
|
35 |
-
|
36 |
-
// Check the nonce
|
37 |
-
check_ajax_referer( 'ditty-news-ticker', 'security' );
|
38 |
-
|
39 |
-
// Get the DNT types
|
40 |
-
$types = mtphr_dnt_types_array();
|
41 |
-
unset($types['mixed']);
|
42 |
-
|
43 |
-
// Display the field
|
44 |
-
mtphr_dnt_render_mixed_tick( $types );
|
45 |
-
|
46 |
-
die(); // this is required to return a proper result
|
47 |
-
}
|
48 |
-
add_action( 'wp_ajax_mtphr_dnt_mixed_list_ajax', 'mtphr_dnt_mixed_list_ajax' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/edit-columns.php
CHANGED
@@ -1,19 +1,9 @@
|
|
1 |
<?php
|
2 |
-
/**
|
3 |
-
* Custom edit columns
|
4 |
-
*
|
5 |
-
* @package Ditty News Ticker
|
6 |
-
*/
|
7 |
|
|
|
|
|
|
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
add_filter( 'manage_ditty_news_ticker_posts_columns', 'mtphr_dnt_set_columns' );
|
12 |
-
/**
|
13 |
-
* Set custom edit screen columns
|
14 |
-
*
|
15 |
-
* @since 1.0
|
16 |
-
*/
|
17 |
function mtphr_dnt_set_columns( $columns ){
|
18 |
|
19 |
$new_columns = array();
|
@@ -30,16 +20,14 @@ function mtphr_dnt_set_columns( $columns ){
|
|
30 |
}
|
31 |
return $new_columns;
|
32 |
}
|
|
|
33 |
|
34 |
|
35 |
|
|
|
|
|
|
|
36 |
|
37 |
-
add_action( 'manage_ditty_news_ticker_posts_custom_column', 'mtphr_dnt_display_columns', 10, 2 );
|
38 |
-
/**
|
39 |
-
* Display the custom edit screen columns
|
40 |
-
*
|
41 |
-
* @since 1.0.5
|
42 |
-
*/
|
43 |
function mtphr_dnt_display_columns( $column, $post_id ){
|
44 |
|
45 |
global $post;
|
@@ -85,16 +73,15 @@ function mtphr_dnt_display_columns( $column, $post_id ){
|
|
85 |
break;
|
86 |
}
|
87 |
}
|
|
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
* @since 1.0.0
|
97 |
-
*/
|
98 |
function mtphr_dnt_sortable_columns( $columns ) {
|
99 |
|
100 |
$columns['dnt_type'] = 'dnt_type';
|
@@ -102,16 +89,14 @@ function mtphr_dnt_sortable_columns( $columns ) {
|
|
102 |
|
103 |
return $columns;
|
104 |
}
|
|
|
105 |
|
106 |
|
107 |
|
|
|
|
|
|
|
108 |
|
109 |
-
add_filter( 'request', 'mtphr_dnt_column_order_request' );
|
110 |
-
/**
|
111 |
-
* Set the custom column order
|
112 |
-
*
|
113 |
-
* @since 1.0.0
|
114 |
-
*/
|
115 |
function mtphr_dnt_column_order_request( $vars ) {
|
116 |
|
117 |
if ( isset( $vars['orderby'] ) && 'dnt_type' == $vars['orderby'] ) {
|
@@ -130,34 +115,78 @@ function mtphr_dnt_column_order_request( $vars ) {
|
|
130 |
|
131 |
return $vars;
|
132 |
}
|
|
|
133 |
|
134 |
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
|
137 |
-
add_filter( 'parse_query','mtphr_dnt_parse_query' );
|
138 |
-
/**
|
139 |
-
* Filter the list of tickers
|
140 |
-
*
|
141 |
-
* @since 1.0.0
|
142 |
-
*/
|
143 |
function mtphr_dnt_parse_query( $query ) {
|
144 |
|
145 |
global $pagenow;
|
146 |
$qv = &$query->query_vars;
|
147 |
|
148 |
if ( $pagenow=='edit.php' && $qv['post_type']=='ditty_news_ticker' ) {
|
149 |
-
|
|
|
|
|
150 |
if( isset($_GET['dnt_type']) ) {
|
151 |
-
$
|
152 |
-
|
|
|
|
|
153 |
}
|
154 |
|
155 |
if( isset($_GET['dnt_mode']) ) {
|
156 |
-
$
|
157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
}
|
159 |
}
|
160 |
}
|
161 |
-
|
162 |
-
|
163 |
-
|
1 |
<?php
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
+
/* --------------------------------------------------------- */
|
4 |
+
/* !Set custom edit screen columns - 1.0.0 */
|
5 |
+
/* --------------------------------------------------------- */
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
function mtphr_dnt_set_columns( $columns ){
|
8 |
|
9 |
$new_columns = array();
|
20 |
}
|
21 |
return $new_columns;
|
22 |
}
|
23 |
+
add_filter( 'manage_ditty_news_ticker_posts_columns', 'mtphr_dnt_set_columns' );
|
24 |
|
25 |
|
26 |
|
27 |
+
/* --------------------------------------------------------- */
|
28 |
+
/* !Display the custom edit screen columns - 1.0.5 */
|
29 |
+
/* --------------------------------------------------------- */
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
function mtphr_dnt_display_columns( $column, $post_id ){
|
32 |
|
33 |
global $post;
|
73 |
break;
|
74 |
}
|
75 |
}
|
76 |
+
add_action( 'manage_ditty_news_ticker_posts_custom_column', 'mtphr_dnt_display_columns', 10, 2 );
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
+
/* --------------------------------------------------------- */
|
82 |
+
/* !Add sortable columns - 1.0.0 */
|
83 |
+
/* --------------------------------------------------------- */
|
84 |
+
|
|
|
|
|
85 |
function mtphr_dnt_sortable_columns( $columns ) {
|
86 |
|
87 |
$columns['dnt_type'] = 'dnt_type';
|
89 |
|
90 |
return $columns;
|
91 |
}
|
92 |
+
add_filter( 'manage_edit-ditty_news_ticker_sortable_columns', 'mtphr_dnt_sortable_columns' );
|
93 |
|
94 |
|
95 |
|
96 |
+
/* --------------------------------------------------------- */
|
97 |
+
/* !Set the custom column order - 1.0.0 */
|
98 |
+
/* --------------------------------------------------------- */
|
99 |
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
function mtphr_dnt_column_order_request( $vars ) {
|
101 |
|
102 |
if ( isset( $vars['orderby'] ) && 'dnt_type' == $vars['orderby'] ) {
|
115 |
|
116 |
return $vars;
|
117 |
}
|
118 |
+
add_filter( 'request', 'mtphr_dnt_column_order_request' );
|
119 |
|
120 |
|
121 |
|
122 |
+
/* --------------------------------------------------------- */
|
123 |
+
/* !Add custom edit screen filters - 1.4.5 */
|
124 |
+
/* --------------------------------------------------------- */
|
125 |
+
|
126 |
+
function mtphr_dnt_edit_screen_filters() {
|
127 |
+
|
128 |
+
global $typenow;
|
129 |
+
|
130 |
+
if( $typenow == 'ditty_news_ticker' ) {
|
131 |
+
$dnt_type = isset($_GET['dnt_type']) ? $_GET['dnt_type'] : '';
|
132 |
+
$dnt_mode = isset($_GET['dnt_mode']) ? $_GET['dnt_mode'] : '';
|
133 |
+
|
134 |
+
$types = mtphr_dnt_types_array();
|
135 |
+
$modes = mtphr_dnt_modes_array();
|
136 |
+
|
137 |
+
echo '<select name="dnt_type">';
|
138 |
+
echo '<option value="">'.__('Show all Types', 'ditty-news-ticker').'</option>';
|
139 |
+
if( is_array($types) && count($types) > 0 ) {
|
140 |
+
foreach( $types as $i=>$type ) {
|
141 |
+
echo '<option value="'.$i.'" '.selected($i, $dnt_type, false).'>'.$type['button'].'</option>';
|
142 |
+
}
|
143 |
+
}
|
144 |
+
echo '</select>';
|
145 |
+
|
146 |
+
echo '<select name="dnt_mode">';
|
147 |
+
echo '<option value="">'.__('Show all Modes', 'ditty-news-ticker').'</option>';
|
148 |
+
if( is_array($modes) && count($modes) > 0 ) {
|
149 |
+
foreach( $modes as $i=>$mode ) {
|
150 |
+
echo '<option value="'.$i.'" '.selected($i, $dnt_mode, false).'>'.$mode['button'].'</option>';
|
151 |
+
}
|
152 |
+
}
|
153 |
+
echo '</select>';
|
154 |
+
}
|
155 |
+
}
|
156 |
+
add_action( 'restrict_manage_posts','mtphr_dnt_edit_screen_filters' );
|
157 |
+
|
158 |
+
|
159 |
+
|
160 |
+
/* --------------------------------------------------------- */
|
161 |
+
/* !Filter the list of tickers - 1.4.5 */
|
162 |
+
/* --------------------------------------------------------- */
|
163 |
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
function mtphr_dnt_parse_query( $query ) {
|
165 |
|
166 |
global $pagenow;
|
167 |
$qv = &$query->query_vars;
|
168 |
|
169 |
if ( $pagenow=='edit.php' && $qv['post_type']=='ditty_news_ticker' ) {
|
170 |
+
|
171 |
+
$meta_query = array();
|
172 |
+
|
173 |
if( isset($_GET['dnt_type']) ) {
|
174 |
+
$meta_query[] = array(
|
175 |
+
'key' => '_mtphr_dnt_type',
|
176 |
+
'value' => $_GET['dnt_type'],
|
177 |
+
);
|
178 |
}
|
179 |
|
180 |
if( isset($_GET['dnt_mode']) ) {
|
181 |
+
$meta_query[] = array(
|
182 |
+
'key' => '_mtphr_dnt_mode',
|
183 |
+
'value' => $_GET['dnt_mode'],
|
184 |
+
);
|
185 |
+
}
|
186 |
+
|
187 |
+
if( count($meta_query) > 0 ) {
|
188 |
+
$qv['meta_query'] = $meta_query;
|
189 |
}
|
190 |
}
|
191 |
}
|
192 |
+
add_filter( 'parse_query','mtphr_dnt_parse_query' );
|
|
|
|
includes/filters.php
CHANGED
@@ -110,7 +110,7 @@ add_filter( 'mtphr_dnt_tick_array_transform', 'mtphr_dnt_tick_grid', 10, 3 );
|
|
110 |
|
111 |
|
112 |
/* --------------------------------------------------------- */
|
113 |
-
/* !Add the control nav for rotating ticks - 1.4.
|
114 |
/* --------------------------------------------------------- */
|
115 |
|
116 |
function mtphr_dnt_direction_nav( $id, $meta_data, $total ) {
|
@@ -129,8 +129,8 @@ function mtphr_dnt_direction_nav( $id, $meta_data, $total ) {
|
|
129 |
if( isset($_mtphr_dnt_rotate_directional_nav_hide) && $_mtphr_dnt_rotate_directional_nav_hide ) {
|
130 |
$hide = ' mtphr-dnt-nav-hide';
|
131 |
}
|
132 |
-
echo '<a class="mtphr-dnt-nav mtphr-dnt-nav-prev'.$hide.'" href="#" rel="nofollow">'.apply_filters( 'mtphr_dnt_direction_nav_prev', '' ).'</a>';
|
133 |
-
echo '<a class="mtphr-dnt-nav mtphr-dnt-nav-next'.$hide.'" href="#" rel="nofollow">'.apply_filters( 'mtphr_dnt_direction_nav_next', '' ).'</a>';
|
134 |
}
|
135 |
}
|
136 |
}
|
@@ -154,7 +154,8 @@ function mtphr_dnt_control_nav( $id, $meta_data, $total ) {
|
|
154 |
|
155 |
echo '<div class="mtphr-dnt-control-links">';
|
156 |
for( $i=0; $i<$total; $i++ ) {
|
157 |
-
|
|
|
158 |
}
|
159 |
echo '</div>';
|
160 |
}
|
@@ -268,4 +269,21 @@ function mtphr_dnt_add_to_global( $id, $meta_data ) {
|
|
268 |
);
|
269 |
}
|
270 |
}
|
271 |
-
add_action( 'mtphr_dnt_after', 'mtphr_dnt_add_to_global', 10, 2 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
|
111 |
|
112 |
/* --------------------------------------------------------- */
|
113 |
+
/* !Add the control nav for rotating ticks - 1.4.5 */
|
114 |
/* --------------------------------------------------------- */
|
115 |
|
116 |
function mtphr_dnt_direction_nav( $id, $meta_data, $total ) {
|
129 |
if( isset($_mtphr_dnt_rotate_directional_nav_hide) && $_mtphr_dnt_rotate_directional_nav_hide ) {
|
130 |
$hide = ' mtphr-dnt-nav-hide';
|
131 |
}
|
132 |
+
echo '<a class="mtphr-dnt-nav mtphr-dnt-nav-prev'.$hide.'" href="#" rel="nofollow">'.apply_filters( 'mtphr_dnt_direction_nav_prev', '<i class="mtphr-dnt-icon-arrow-left"></i>' ).'</a>';
|
133 |
+
echo '<a class="mtphr-dnt-nav mtphr-dnt-nav-next'.$hide.'" href="#" rel="nofollow">'.apply_filters( 'mtphr_dnt_direction_nav_next', '<i class="mtphr-dnt-icon-arrow-right"></i>' ).'</a>';
|
134 |
}
|
135 |
}
|
136 |
}
|
154 |
|
155 |
echo '<div class="mtphr-dnt-control-links">';
|
156 |
for( $i=0; $i<$total; $i++ ) {
|
157 |
+
$link = ( $_mtphr_dnt_rotate_control_nav_type == 'button' ) ? '<i class="mtphr-dnt-icon-button"></i>' : intval($i+1);
|
158 |
+
echo '<a class="mtphr-dnt-control mtphr-dnt-control-'.$_mtphr_dnt_rotate_control_nav_type.'" href="'.$i.'" rel="nofollow">'.apply_filters( 'mtphr_dnt_control_nav', $link, $_mtphr_dnt_rotate_control_nav_type ).'</a>';
|
159 |
}
|
160 |
echo '</div>';
|
161 |
}
|
269 |
);
|
270 |
}
|
271 |
}
|
272 |
+
add_action( 'mtphr_dnt_after', 'mtphr_dnt_add_to_global', 10, 2 );
|
273 |
+
|
274 |
+
|
275 |
+
|
276 |
+
/* --------------------------------------------------------- */
|
277 |
+
/* !Add an edit link to the tickers - 1.4.5 */
|
278 |
+
/* --------------------------------------------------------- */
|
279 |
+
|
280 |
+
function mtphr_dnt_tick_edit_link( $id ) {
|
281 |
+
if( current_user_can('edit_pages') ) {
|
282 |
+
$settings = mtphr_dnt_general_settings();
|
283 |
+
if( isset($settings['edit_links']) && $settings['edit_links'] ) {
|
284 |
+
echo '<a class="mtphr-dnt-edit-link" href="'.get_edit_post_link( $id ).'">'.__('<i class="mtphr-dnt-icon-gear"></i> Edit ticker', 'ditty-news-ticker').'</a>';
|
285 |
+
}
|
286 |
+
}
|
287 |
+
}
|
288 |
+
add_action( 'mtphr_dnt_before', 'mtphr_dnt_tick_edit_link' );
|
289 |
+
|
includes/functions.php
CHANGED
@@ -91,7 +91,7 @@ function get_mtphr_dnt_ticker( $id='', $class='', $atts=false ) {
|
|
91 |
|
92 |
echo '<div'.$ticker_width.' id="'.$tick_id.'" '.mtphr_dnt_ticker_class( $id, $class, $meta_data ).'>';
|
93 |
echo '<div class="mtphr-dnt-wrapper mtphr-dnt-clearfix">';
|
94 |
-
|
95 |
// Display the title
|
96 |
if( isset($_mtphr_dnt_title) && $_mtphr_dnt_title ) {
|
97 |
|
91 |
|
92 |
echo '<div'.$ticker_width.' id="'.$tick_id.'" '.mtphr_dnt_ticker_class( $id, $class, $meta_data ).'>';
|
93 |
echo '<div class="mtphr-dnt-wrapper mtphr-dnt-clearfix">';
|
94 |
+
|
95 |
// Display the title
|
96 |
if( isset($_mtphr_dnt_title) && $_mtphr_dnt_title ) {
|
97 |
|
includes/meta-boxes.php
CHANGED
@@ -182,7 +182,7 @@ add_action( 'add_meta_boxes', 'mtphr_dnt_global_settings_metabox' );
|
|
182 |
|
183 |
|
184 |
/* --------------------------------------------------------- */
|
185 |
-
/* !Render the default type metabox - 1.4.
|
186 |
/* --------------------------------------------------------- */
|
187 |
|
188 |
if( !function_exists('mtphr_dnt_default_render_metabox') ) {
|
@@ -215,10 +215,15 @@ function mtphr_dnt_default_render_metabox() {
|
|
215 |
echo '<small>'.__('Add an unlimited number of ticks to your ticker', 'ditty-news-ticker').'</small>';
|
216 |
echo '</td>';
|
217 |
echo '<td>';
|
218 |
-
echo '<table class="mtphr-dnt-list mtphr-dnt-default-list">';
|
219 |
echo '<tr>';
|
220 |
echo '<th class="mtphr-dnt-list-handle"></th>';
|
221 |
-
|
|
|
|
|
|
|
|
|
|
|
222 |
echo '<th>'.__('Link', 'ditty-news-ticker').'</th>';
|
223 |
echo '<th class="mtphr-dnt-default-target">'.__('Target', 'ditty-news-ticker').'</th>';
|
224 |
echo '<th class="mtphr-dnt-default-nofollow">'.__('NF', 'ditty-news-ticker').'</th>';
|
@@ -250,28 +255,29 @@ function mtphr_dnt_render_default_tick( $settings, $tick=false ) {
|
|
250 |
|
251 |
echo '<tr class="mtphr-dnt-list-item">';
|
252 |
echo '<td class="mtphr-dnt-list-handle"><span></span></td>';
|
253 |
-
echo '<td class="mtphr-dnt-default-tick">';
|
254 |
if( $settings['wysiwyg'] == '1' ) {
|
255 |
$editor_settings = array();
|
256 |
$editor_settings['media_buttons'] = true;
|
257 |
$editor_settings['textarea_rows'] = 6;
|
|
|
258 |
$editor_settings['textarea_name'] = '_mtphr_dnt_ticks[tick]';
|
259 |
wp_editor( $text, 'mtphrdnttick'.uniqid(), $editor_settings );
|
260 |
} else {
|
261 |
-
echo '<textarea name="_mtphr_dnt_ticks[tick]" key="tick">'.$text.'</textarea>';
|
262 |
}
|
263 |
echo '</td>';
|
264 |
echo '<td class="mtphr-dnt-default-link">';
|
265 |
-
echo '<input type="text" name="_mtphr_dnt_ticks[link]" key="link" value="'.$link.'" />';
|
266 |
echo '</td>';
|
267 |
echo '<td class="mtphr-dnt-default-target">';
|
268 |
-
echo '<select name="_mtphr_dnt_ticks[target]" key="target">';
|
269 |
echo '<option value="_self" '.selected('_self', $target, false).'>_self</option>';
|
270 |
echo '<option value="_blank" '.selected('_blank', $target, false).'>_blank</option>';
|
271 |
echo '</select>';
|
272 |
echo '</td>';
|
273 |
echo '<td class="mtphr-dnt-default-nofollow">';
|
274 |
-
echo '<input type="checkbox" name="_mtphr_dnt_ticks[nofollow]" key="nofollow" value="1" '.checked('1', $nofollow, false).' />';
|
275 |
echo '</td>';
|
276 |
echo '<td class="mtphr-dnt-list-delete"><a href="#"></a></td>';
|
277 |
echo '<td class="mtphr-dnt-list-add"><a href="#"></a></td>';
|
@@ -282,7 +288,7 @@ function mtphr_dnt_render_default_tick( $settings, $tick=false ) {
|
|
282 |
|
283 |
|
284 |
/* --------------------------------------------------------- */
|
285 |
-
/* !Render the mixed type metabox - 1.
|
286 |
/* --------------------------------------------------------- */
|
287 |
|
288 |
if( !function_exists('mtphr_dnt_mixed_render_metabox') ) {
|
@@ -293,12 +299,8 @@ function mtphr_dnt_mixed_render_metabox() {
|
|
293 |
$ticks = get_post_meta( $post->ID, '_mtphr_dnt_mixed_ticks', true );
|
294 |
$types = mtphr_dnt_types_array();
|
295 |
unset($types['mixed']);
|
296 |
-
|
297 |
-
//echo '<pre>';print_r($ticks);echo '</pre>';
|
298 |
|
299 |
echo '<input type="hidden" name="mtphr_dnt_nonce" value="'.wp_create_nonce(basename(__FILE__)).'" />';
|
300 |
-
|
301 |
-
echo '<a href="#" id="mtphr-dnt-mixed-add-tick" class="button-primary">'.__('Add Tick', 'ditty-news-ticker').'</a><span class="spinner mtphr-dnt-add-spinner"></span>';
|
302 |
|
303 |
echo '<table class="mtphr-dnt-table">';
|
304 |
|
@@ -308,7 +310,7 @@ function mtphr_dnt_mixed_render_metabox() {
|
|
308 |
echo '<small>'.__('Select the ticks you would like to display by choosing the tick type and the offset position of the selected feed', 'ditty-news-ticker').'</small>';
|
309 |
echo '</td>';
|
310 |
echo '<td>';
|
311 |
-
echo '<table class="mtphr-dnt-list mtphr-dnt-mixed-list" style="width:auto;">';
|
312 |
if( is_array($ticks) && count($ticks) > 0 ) {
|
313 |
foreach( $ticks as $i=>$tick ) {
|
314 |
mtphr_dnt_render_mixed_tick( $types, $tick, $i );
|
@@ -334,7 +336,7 @@ function mtphr_dnt_render_mixed_tick( $types, $tick=false, $i=false ) {
|
|
334 |
echo '<td class="mtphr-dnt-list-handle"><span></span></td>';
|
335 |
echo '<td class="mtphr-dnt-mixed-type">';
|
336 |
echo '<label style="margin-right:10px;">'.__('Type:', 'ditty-news-ticker').' ';
|
337 |
-
echo '<select name="_mtphr_dnt_mixed_ticks[type]" key="type">';
|
338 |
echo '<option value="">-- '.__('Select Tick Type', 'ditty-news-ticker').' --</option>';
|
339 |
foreach( $types as $i=>$type ) {
|
340 |
echo '<option value="'.$i.'" '.selected($i, $tick_type, false).'>'.$type['button'].'</option>';
|
@@ -344,10 +346,11 @@ function mtphr_dnt_render_mixed_tick( $types, $tick=false, $i=false ) {
|
|
344 |
echo '</td>';
|
345 |
echo '<td>';
|
346 |
echo '<label>'.__('Offset:', 'ditty-news-ticker').' ';
|
347 |
-
echo '<input type="number" name="_mtphr_dnt_mixed_ticks[offset]" key="offset" value="'.$tick_offset.'" />';
|
348 |
echo '</label>';
|
349 |
echo '</td>';
|
350 |
echo '<td class="mtphr-dnt-list-delete"><a href="#"></a></td>';
|
|
|
351 |
echo '</tr>';
|
352 |
}
|
353 |
}
|
182 |
|
183 |
|
184 |
/* --------------------------------------------------------- */
|
185 |
+
/* !Render the default type metabox - 1.4.5 */
|
186 |
/* --------------------------------------------------------- */
|
187 |
|
188 |
if( !function_exists('mtphr_dnt_default_render_metabox') ) {
|
215 |
echo '<small>'.__('Add an unlimited number of ticks to your ticker', 'ditty-news-ticker').'</small>';
|
216 |
echo '</td>';
|
217 |
echo '<td>';
|
218 |
+
echo '<table class="mtphr-dnt-list mtphr-dnt-default-list mtphr-dnt-advanced-list">';
|
219 |
echo '<tr>';
|
220 |
echo '<th class="mtphr-dnt-list-handle"></th>';
|
221 |
+
|
222 |
+
$label = __('Ticker text', 'ditty-news-ticker');
|
223 |
+
if( $settings['wysiwyg'] == '1' ) {
|
224 |
+
$label .= '<div class="mtphr-dnt-notice">'.__('<strong>Notice:</strong> When using the WYSIWYG editor you must save your ticker after adding or re-arranging ticks.', 'ditty-news-ticker').'</div>';
|
225 |
+
}
|
226 |
+
echo '<th>'.$label.'</th>';
|
227 |
echo '<th>'.__('Link', 'ditty-news-ticker').'</th>';
|
228 |
echo '<th class="mtphr-dnt-default-target">'.__('Target', 'ditty-news-ticker').'</th>';
|
229 |
echo '<th class="mtphr-dnt-default-nofollow">'.__('NF', 'ditty-news-ticker').'</th>';
|
255 |
|
256 |
echo '<tr class="mtphr-dnt-list-item">';
|
257 |
echo '<td class="mtphr-dnt-list-handle"><span></span></td>';
|
258 |
+
echo '<td class="mtphr-dnt-default-tick mtphr-dnt-wysiwyg-container" data-name="_mtphr_dnt_ticks" data-key="tick">';
|
259 |
if( $settings['wysiwyg'] == '1' ) {
|
260 |
$editor_settings = array();
|
261 |
$editor_settings['media_buttons'] = true;
|
262 |
$editor_settings['textarea_rows'] = 6;
|
263 |
+
$editor_settings['editor_class'] = 'mtphr-dnt-wysiwyg';
|
264 |
$editor_settings['textarea_name'] = '_mtphr_dnt_ticks[tick]';
|
265 |
wp_editor( $text, 'mtphrdnttick'.uniqid(), $editor_settings );
|
266 |
} else {
|
267 |
+
echo '<textarea name="_mtphr_dnt_ticks[tick]" data-name="_mtphr_dnt_ticks" data-key="tick">'.$text.'</textarea>';
|
268 |
}
|
269 |
echo '</td>';
|
270 |
echo '<td class="mtphr-dnt-default-link">';
|
271 |
+
echo '<input type="text" name="_mtphr_dnt_ticks[link]" data-name="_mtphr_dnt_ticks" data-key="link" value="'.$link.'" />';
|
272 |
echo '</td>';
|
273 |
echo '<td class="mtphr-dnt-default-target">';
|
274 |
+
echo '<select name="_mtphr_dnt_ticks[target]" data-name="_mtphr_dnt_ticks" data-key="target">';
|
275 |
echo '<option value="_self" '.selected('_self', $target, false).'>_self</option>';
|
276 |
echo '<option value="_blank" '.selected('_blank', $target, false).'>_blank</option>';
|
277 |
echo '</select>';
|
278 |
echo '</td>';
|
279 |
echo '<td class="mtphr-dnt-default-nofollow">';
|
280 |
+
echo '<input type="checkbox" name="_mtphr_dnt_ticks[nofollow]" data-name="_mtphr_dnt_ticks" data-key="nofollow" value="1" '.checked('1', $nofollow, false).' />';
|
281 |
echo '</td>';
|
282 |
echo '<td class="mtphr-dnt-list-delete"><a href="#"></a></td>';
|
283 |
echo '<td class="mtphr-dnt-list-add"><a href="#"></a></td>';
|
288 |
|
289 |
|
290 |
/* --------------------------------------------------------- */
|
291 |
+
/* !Render the mixed type metabox - 1.4.5 */
|
292 |
/* --------------------------------------------------------- */
|
293 |
|
294 |
if( !function_exists('mtphr_dnt_mixed_render_metabox') ) {
|
299 |
$ticks = get_post_meta( $post->ID, '_mtphr_dnt_mixed_ticks', true );
|
300 |
$types = mtphr_dnt_types_array();
|
301 |
unset($types['mixed']);
|
|
|
|
|
302 |
|
303 |
echo '<input type="hidden" name="mtphr_dnt_nonce" value="'.wp_create_nonce(basename(__FILE__)).'" />';
|
|
|
|
|
304 |
|
305 |
echo '<table class="mtphr-dnt-table">';
|
306 |
|
310 |
echo '<small>'.__('Select the ticks you would like to display by choosing the tick type and the offset position of the selected feed', 'ditty-news-ticker').'</small>';
|
311 |
echo '</td>';
|
312 |
echo '<td>';
|
313 |
+
echo '<table class="mtphr-dnt-list mtphr-dnt-mixed-list mtphr-dnt-advanced-list" style="width:auto;">';
|
314 |
if( is_array($ticks) && count($ticks) > 0 ) {
|
315 |
foreach( $ticks as $i=>$tick ) {
|
316 |
mtphr_dnt_render_mixed_tick( $types, $tick, $i );
|
336 |
echo '<td class="mtphr-dnt-list-handle"><span></span></td>';
|
337 |
echo '<td class="mtphr-dnt-mixed-type">';
|
338 |
echo '<label style="margin-right:10px;">'.__('Type:', 'ditty-news-ticker').' ';
|
339 |
+
echo '<select name="_mtphr_dnt_mixed_ticks[type]" data-name="_mtphr_dnt_mixed_ticks" data-key="type">';
|
340 |
echo '<option value="">-- '.__('Select Tick Type', 'ditty-news-ticker').' --</option>';
|
341 |
foreach( $types as $i=>$type ) {
|
342 |
echo '<option value="'.$i.'" '.selected($i, $tick_type, false).'>'.$type['button'].'</option>';
|
346 |
echo '</td>';
|
347 |
echo '<td>';
|
348 |
echo '<label>'.__('Offset:', 'ditty-news-ticker').' ';
|
349 |
+
echo '<input type="number" name="_mtphr_dnt_mixed_ticks[offset]" data-name="_mtphr_dnt_mixed_ticks" data-key="offset" value="'.$tick_offset.'" />';
|
350 |
echo '</label>';
|
351 |
echo '</td>';
|
352 |
echo '<td class="mtphr-dnt-list-delete"><a href="#"></a></td>';
|
353 |
+
echo '<td class="mtphr-dnt-list-add"><a href="#"></a></td>';
|
354 |
echo '</tr>';
|
355 |
}
|
356 |
}
|
includes/metaboxer/images/arrow-resize-090.png
DELETED
Binary file
|
includes/metaboxer/images/attachment-audio.png
DELETED
Binary file
|
includes/metaboxer/images/attachment-delete.png
DELETED
Binary file
|
includes/metaboxer/images/attachment-image.png
DELETED
Binary file
|
includes/metaboxer/images/attachment-preview.png
DELETED
Binary file
|
includes/metaboxer/images/attachment-settings.png
DELETED
Binary file
|
includes/metaboxer/images/attachment-video.png
DELETED
Binary file
|
includes/metaboxer/images/attachment-vimeo.png
DELETED
Binary file
|
includes/metaboxer/images/attachment-youtube.png
DELETED
Binary file
|
includes/metaboxer/images/minus-circle.png
DELETED
Binary file
|
includes/metaboxer/images/plus-circle.png
DELETED
Binary file
|
includes/metaboxer/metaboxer-class.php
DELETED
@@ -1,186 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* This is where the metabox magic happens.
|
4 |
-
*
|
5 |
-
* @package Ditty News Ticker
|
6 |
-
* @author Metaphor Creations
|
7 |
-
* @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
|
8 |
-
* @link http://www.metaphorcreations.com/plugins/metatools
|
9 |
-
**/
|
10 |
-
|
11 |
-
/* Version 1.1 - 10/18/2012 */
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
/**
|
17 |
-
* Create the metabox class
|
18 |
-
*
|
19 |
-
* @since 1.0.0
|
20 |
-
*/
|
21 |
-
if( !class_exists('MTPHR_DNT_MetaBoxer') ) {
|
22 |
-
|
23 |
-
class MTPHR_DNT_MetaBoxer {
|
24 |
-
|
25 |
-
public function __construct( $meta_box ) {
|
26 |
-
|
27 |
-
if ( !is_admin() ) return;
|
28 |
-
|
29 |
-
// Save the meta box data
|
30 |
-
$this->mb = $meta_box;
|
31 |
-
$this->mb_fields = &$this->mb['fields'];
|
32 |
-
|
33 |
-
add_action( 'add_meta_boxes', array(&$this, 'mtphr_dnt_metaboxer_add') );
|
34 |
-
add_action( 'save_post', array(&$this, 'mtphr_dnt_metaboxer_save') );
|
35 |
-
}
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Create the metaboxes
|
42 |
-
*
|
43 |
-
* @since 1.0.0
|
44 |
-
*/
|
45 |
-
public function mtphr_dnt_metaboxer_add() {
|
46 |
-
|
47 |
-
foreach ( $this->mb['page'] as $page ) {
|
48 |
-
add_meta_box( $this->mb['id'], $this->mb['title'], array(&$this, 'mtphr_dnt_metaboxer_render_content'), $page, $this->mb['context'], $this->mb['priority'] );
|
49 |
-
}
|
50 |
-
}
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
/**
|
56 |
-
* Render the metabox content
|
57 |
-
*
|
58 |
-
* @since 1.0.0
|
59 |
-
*/
|
60 |
-
public function mtphr_dnt_metaboxer_render_content() {
|
61 |
-
?>
|
62 |
-
<table style="width:100%;" class="mtphr-dnt-metaboxer-admin-fields wrap">
|
63 |
-
<?php
|
64 |
-
foreach( $this->mb_fields as $field ) {
|
65 |
-
|
66 |
-
if ( isset( $field['id'] ) ) {
|
67 |
-
// Create a nonce field
|
68 |
-
echo'<input type="hidden" name="'.$field['id'].'_noncename" id="'.$field['id'].'_noncename" value="'.wp_create_nonce( plugin_basename(__FILE__) ).'" />';
|
69 |
-
}
|
70 |
-
|
71 |
-
// Output the field
|
72 |
-
mtphr_dnt_metaboxer_container( $field, $this->mb['context'] );
|
73 |
-
}
|
74 |
-
?>
|
75 |
-
</table>
|
76 |
-
<?php
|
77 |
-
}
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Save the field values
|
84 |
-
*
|
85 |
-
* @since 1.0.0
|
86 |
-
*/
|
87 |
-
public function mtphr_dnt_metaboxer_save( $post_id ) {
|
88 |
-
|
89 |
-
global $post;
|
90 |
-
|
91 |
-
foreach( $this->mb_fields as $field ) {
|
92 |
-
|
93 |
-
if ( isset($field['id']) ) {
|
94 |
-
|
95 |
-
if ( isset($_POST[$field['id'].'_noncename']) ) {
|
96 |
-
|
97 |
-
// Verify the nonce and return if false
|
98 |
-
if ( !wp_verify_nonce($_POST[$field['id'].'_noncename'], plugin_basename(__FILE__)) ) {
|
99 |
-
return $post_id;
|
100 |
-
}
|
101 |
-
|
102 |
-
// Make sure the user can edit pages & posts
|
103 |
-
if ( 'page' == $_POST['post_type'] ) {
|
104 |
-
if ( !current_user_can('edit_page', $post_id) ) {
|
105 |
-
return $post_id;
|
106 |
-
}
|
107 |
-
} else {
|
108 |
-
if ( !current_user_can('edit_post', $post_id) ) {
|
109 |
-
return $post_id;
|
110 |
-
}
|
111 |
-
}
|
112 |
-
|
113 |
-
// Store the user data or set as empty string
|
114 |
-
$data = ( isset($_POST[$field['id']]) ) ? $_POST[$field['id']] : '';
|
115 |
-
|
116 |
-
// Update the meta
|
117 |
-
mtphr_dnt_metaboxer_update_meta( $post_id, $field['id'], $field['type'], $data );
|
118 |
-
|
119 |
-
// Save appended fields
|
120 |
-
mtphr_dnt_metaboxer_save_appended( $post_id, $field );
|
121 |
-
|
122 |
-
// Save row fields
|
123 |
-
mtphr_dnt_metaboxer_save_rows( $post_id, $field );
|
124 |
-
}
|
125 |
-
}
|
126 |
-
}
|
127 |
-
}
|
128 |
-
}
|
129 |
-
|
130 |
-
/**
|
131 |
-
* Save the row field values
|
132 |
-
*
|
133 |
-
* @since 1.0.0
|
134 |
-
*/
|
135 |
-
function mtphr_dnt_metaboxer_save_rows( $post_id, $field ) {
|
136 |
-
|
137 |
-
if( isset($field['rows']) ) {
|
138 |
-
|
139 |
-
foreach( $field['rows'] as $id => $row ) {
|
140 |
-
|
141 |
-
$row_id = $row['id'];
|
142 |
-
|
143 |
-
// Store the user data or set as empty string
|
144 |
-
$data = ( isset($_POST[$row_id]) ) ? $_POST[$row_id] : '';
|
145 |
-
|
146 |
-
// Update the meta
|
147 |
-
mtphr_dnt_metaboxer_update_meta( $post_id, $row_id, $row['type'], $data );
|
148 |
-
|
149 |
-
// Save appended fields
|
150 |
-
mtphr_dnt_metaboxer_save_appended( $post_id, $row );
|
151 |
-
}
|
152 |
-
}
|
153 |
-
}
|
154 |
-
|
155 |
-
/**
|
156 |
-
* Save the appended field values
|
157 |
-
*
|
158 |
-
* @since 1.0.0
|
159 |
-
*/
|
160 |
-
function mtphr_dnt_metaboxer_save_appended( $post_id, $field ) {
|
161 |
-
|
162 |
-
if( isset($field['append']) ) {
|
163 |
-
|
164 |
-
foreach( $field['append'] as $id => $append ) {
|
165 |
-
|
166 |
-
// Store the user data or set as empty string
|
167 |
-
$data = ( isset($_POST[$id]) ) ? $_POST[$id] : '';
|
168 |
-
|
169 |
-
// Update the meta
|
170 |
-
mtphr_dnt_metaboxer_update_meta( $post_id, $id, $append['type'], $data );
|
171 |
-
}
|
172 |
-
}
|
173 |
-
}
|
174 |
-
|
175 |
-
/**
|
176 |
-
* Update the meta
|
177 |
-
*
|
178 |
-
* @since 1.0.0
|
179 |
-
*/
|
180 |
-
function mtphr_dnt_metaboxer_update_meta( $post_id, $id, $type, $data ) {
|
181 |
-
|
182 |
-
// Update the post meta
|
183 |
-
update_post_meta( $post_id, $id, $data );
|
184 |
-
}
|
185 |
-
|
186 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/metaboxer/metaboxer.css
DELETED
@@ -1,349 +0,0 @@
|
|
1 |
-
/* General - 1.0.2
|
2 |
-
------------------------------------------------------------ */
|
3 |
-
|
4 |
-
.mtphr-dnt-metaboxer-admin-fields {
|
5 |
-
padding-top: 10px;
|
6 |
-
}
|
7 |
-
.mtphr-dnt-metaboxer-loading-gif {
|
8 |
-
opacity: 0;
|
9 |
-
}
|
10 |
-
.mtphr-dnt-metaboxer-appended {
|
11 |
-
display: inline;
|
12 |
-
margin-left: 20px;
|
13 |
-
}
|
14 |
-
.mtphr-dnt-metaboxer-widget-field {
|
15 |
-
display: block;
|
16 |
-
margin: 0 0 1em;
|
17 |
-
padding: 0;
|
18 |
-
}
|
19 |
-
|
20 |
-
/* Fields */
|
21 |
-
.mtphr-dnt-metaboxer-field {
|
22 |
-
/* margin-bottom: 20px; */
|
23 |
-
}
|
24 |
-
#side-info-column .mtphr-dnt-metaboxer-field {
|
25 |
-
margin-bottom: 10px;
|
26 |
-
}
|
27 |
-
.mtphr-dnt-metaboxer-field:last-child {
|
28 |
-
margin-bottom: 0;
|
29 |
-
}
|
30 |
-
.mtphr-dnt-metaboxer-field input[type="radio"] {
|
31 |
-
margin-top:-1px;
|
32 |
-
}
|
33 |
-
|
34 |
-
/* Labels */
|
35 |
-
.mtphr-dnt-metaboxer-label {
|
36 |
-
vertical-align: top;
|
37 |
-
width: 20%;
|
38 |
-
overflow: hidden;
|
39 |
-
padding-bottom: 20px;
|
40 |
-
padding-right: 20px;
|
41 |
-
}
|
42 |
-
.mtphr-dnt-metaboxer-label label {
|
43 |
-
display: block;
|
44 |
-
font-weight: bold;
|
45 |
-
font-size: 12px;
|
46 |
-
}
|
47 |
-
.mtphr-dnt-metaboxer-label small {
|
48 |
-
font-size: 10px;
|
49 |
-
font-style: italic;
|
50 |
-
}
|
51 |
-
#side-sortables .mtphr-dnt-metaboxer-label {
|
52 |
-
width: auto;
|
53 |
-
margin: 0;
|
54 |
-
padding: 0;
|
55 |
-
}
|
56 |
-
|
57 |
-
/* Content */
|
58 |
-
.mtphr-dnt-metaboxer-field-content {
|
59 |
-
width: 80%;
|
60 |
-
vertical-align: top;
|
61 |
-
padding-bottom: 10px;
|
62 |
-
}
|
63 |
-
#mtphr_dnt_global_settings .mtphr-dnt-metaboxer-field-content {
|
64 |
-
padding-bottom: 0;
|
65 |
-
}
|
66 |
-
.mtphr-dnt-metaboxer-field-content-full {
|
67 |
-
width: 100%;
|
68 |
-
}
|
69 |
-
.vertical .mtphr-dnt-metaboxer-field-content,
|
70 |
-
#side-sortables .vertical .mtphr-dnt-metaboxer-field-content {
|
71 |
-
float: none;
|
72 |
-
width: auto;
|
73 |
-
}
|
74 |
-
|
75 |
-
/* Clearfix */
|
76 |
-
.clearfix {
|
77 |
-
*zoom: 1;
|
78 |
-
}
|
79 |
-
.clearfix:before,
|
80 |
-
.clearfix:after {
|
81 |
-
display: table;
|
82 |
-
content: "";
|
83 |
-
}
|
84 |
-
.clearfix:after {
|
85 |
-
clear: both;
|
86 |
-
}
|
87 |
-
|
88 |
-
/* Checkbox
|
89 |
-
------------------------------------------------------------ */
|
90 |
-
|
91 |
-
.mtphr-dnt-metaboxer-checkbox input {
|
92 |
-
margin-top: 0;
|
93 |
-
margin-right: 1px;
|
94 |
-
}
|
95 |
-
|
96 |
-
/* Code - 1.0.1
|
97 |
-
------------------------------------------------------------ */
|
98 |
-
|
99 |
-
.mtphr-dnt-metaboxer-code pre {
|
100 |
-
margin: 0 0 5px 0;
|
101 |
-
padding: 10px;
|
102 |
-
background: #FFF;
|
103 |
-
border: 1px solid #EEE;
|
104 |
-
white-space: normal;
|
105 |
-
word-break: break-all;
|
106 |
-
|
107 |
-
-webkit-border-radius: 5px;
|
108 |
-
-moz-border-radius: 5px;
|
109 |
-
border-radius: 5px;
|
110 |
-
}
|
111 |
-
.mtphr-dnt-metaboxer-code pre p {
|
112 |
-
margin: 0;
|
113 |
-
}
|
114 |
-
|
115 |
-
/* File
|
116 |
-
------------------------------------------------------------ */
|
117 |
-
|
118 |
-
.wp-core-ui .mtphr-dnt-metaboxer-file-upload {
|
119 |
-
display: none;
|
120 |
-
}
|
121 |
-
.mtphr-dnt-metaboxer-file-table {
|
122 |
-
width: 100%;
|
123 |
-
}
|
124 |
-
.mtphr-dnt-metaboxer-file-display a {
|
125 |
-
display: block;
|
126 |
-
margin: 0;
|
127 |
-
padding: 10px;
|
128 |
-
background: #FEFEFE;
|
129 |
-
border: 1px solid #EEE;
|
130 |
-
white-space: normal;
|
131 |
-
text-decoration: none;
|
132 |
-
|
133 |
-
-webkit-border-radius: 5px;
|
134 |
-
-moz-border-radius: 5px;
|
135 |
-
border-radius: 5px;
|
136 |
-
}
|
137 |
-
.mtphr-dnt-metaboxer-file-display img {
|
138 |
-
display: block;
|
139 |
-
float: left;
|
140 |
-
margin-right: 10px;
|
141 |
-
}
|
142 |
-
.mtphr-dnt-metaboxer-file-display span {
|
143 |
-
text-decoration: none;
|
144 |
-
}
|
145 |
-
.mtphr-dnt-metaboxer-file-delete {
|
146 |
-
width: 16px;
|
147 |
-
padding-top: 4px !important;
|
148 |
-
}
|
149 |
-
.mtphr-dnt-metaboxer-file-delete a {
|
150 |
-
display: block;
|
151 |
-
text-indent: -9999px;
|
152 |
-
width: 16px;
|
153 |
-
height: 16px;
|
154 |
-
background: url(images/minus-circle.png) no-repeat top;
|
155 |
-
}
|
156 |
-
.mtphr-dnt-metaboxer-file-delete a:hover {
|
157 |
-
background-position: 0 -16px;
|
158 |
-
}
|
159 |
-
|
160 |
-
/* Image
|
161 |
-
------------------------------------------------------------ */
|
162 |
-
|
163 |
-
.wp-core-ui .mtphr-dnt-metaboxer-image-upload {
|
164 |
-
display: none;
|
165 |
-
}
|
166 |
-
.form-table td.mtphr-dnt-metaboxer-image-display {
|
167 |
-
padding-left: 0;
|
168 |
-
padding-right: 0;
|
169 |
-
}
|
170 |
-
.mtphr-dnt-metaboxer-image-display a {
|
171 |
-
display: block;
|
172 |
-
margin: 0;
|
173 |
-
padding: 10px;
|
174 |
-
background: #FEFEFE;
|
175 |
-
border: 1px solid #EEE;
|
176 |
-
white-space: normal;
|
177 |
-
text-decoration: none;
|
178 |
-
|
179 |
-
-webkit-border-radius: 5px;
|
180 |
-
-moz-border-radius: 5px;
|
181 |
-
border-radius: 5px;
|
182 |
-
}
|
183 |
-
.mtphr-dnt-metaboxer-image-display img {
|
184 |
-
display: block;
|
185 |
-
padding: 5px;
|
186 |
-
}
|
187 |
-
.mtphr-dnt-metaboxer-image-display span {
|
188 |
-
text-decoration: none;
|
189 |
-
}
|
190 |
-
.mtphr-dnt-metaboxer-image-delete {
|
191 |
-
width: 16px;
|
192 |
-
padding-top: 4px !important;
|
193 |
-
}
|
194 |
-
.mtphr-dnt-metaboxer-image-delete a {
|
195 |
-
display: block;
|
196 |
-
text-indent: -9999px;
|
197 |
-
width: 16px;
|
198 |
-
height: 16px;
|
199 |
-
background: url(images/minus-circle.png) no-repeat top;
|
200 |
-
}
|
201 |
-
.mtphr-dnt-metaboxer-image-delete a:hover {
|
202 |
-
background-position: 0 -16px;
|
203 |
-
}
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
/* Image Select
|
208 |
-
------------------------------------------------------------ */
|
209 |
-
|
210 |
-
.mtphr-dnt-metaboxer-image-select {
|
211 |
-
margin-bottom: 10px;
|
212 |
-
}
|
213 |
-
a.mtphr-dnt-metaboxer-image-select-link {
|
214 |
-
display: block;
|
215 |
-
float: left;
|
216 |
-
margin: 0 10px 10px 0;
|
217 |
-
text-decoration: none;
|
218 |
-
}
|
219 |
-
a.mtphr-dnt-metaboxer-image-select-link small {
|
220 |
-
display: block;
|
221 |
-
text-align: center;
|
222 |
-
font-weight: bold;
|
223 |
-
color: #333;
|
224 |
-
}
|
225 |
-
a.mtphr-dnt-metaboxer-image-select-link img {
|
226 |
-
opacity: .5;
|
227 |
-
-webkit-transition: opacity .2s linear;
|
228 |
-
-moz-transition: opacity .2s linear;
|
229 |
-
-o-transition: opacity .2s linear;
|
230 |
-
-ms-transition: opacity .2s linear;
|
231 |
-
transition: opacity .2s linear;
|
232 |
-
}
|
233 |
-
a.mtphr-dnt-metaboxer-image-select-link.selected img {
|
234 |
-
opacity: 1;
|
235 |
-
}
|
236 |
-
|
237 |
-
/* List - 1.0.1
|
238 |
-
------------------------------------------------------------ */
|
239 |
-
|
240 |
-
.mtphr-dnt-metaboxer-list > table {
|
241 |
-
width: 100%;
|
242 |
-
}
|
243 |
-
.mtphr-dnt-metaboxer-list th,
|
244 |
-
.mtphr-dnt-metaboxer-list td {
|
245 |
-
text-align: left;
|
246 |
-
vertical-align: top;
|
247 |
-
padding: 0 3px;
|
248 |
-
}
|
249 |
-
.mtphr-dnt-metaboxer-list input[type="text"],
|
250 |
-
.mtphr-dnt-metaboxer-list input[type="number"],
|
251 |
-
.mtphr-dnt-metaboxer-list input[type="email"],
|
252 |
-
.mtphr-dnt-metaboxer-list input[type="password"],
|
253 |
-
.mtphr-dnt-metaboxer-list textarea {
|
254 |
-
width: 100%;
|
255 |
-
}
|
256 |
-
.mtphr-dnt-metaboxer-list-item-handle,
|
257 |
-
.mtphr-dnt-metaboxer-list-item-add,
|
258 |
-
.mtphr-dnt-metaboxer-list-item-delete {
|
259 |
-
width: 16px;
|
260 |
-
padding-top: 4px !important;
|
261 |
-
}
|
262 |
-
.mtphr-dnt-metaboxer-list td.mtphr-dnt-metaboxer-list-item-handle {
|
263 |
-
padding-left: 0;
|
264 |
-
}
|
265 |
-
.mtphr-dnt-metaboxer-list td.mtphr-dnt-metaboxer-list-item-add,
|
266 |
-
.mtphr-dnt-metaboxer-list td.mtphr-dnt-metaboxer-list-item-delete {
|
267 |
-
padding-right: 0;
|
268 |
-
}
|
269 |
-
.mtphr-dnt-metaboxer-list-item-handle span,
|
270 |
-
.mtphr-dnt-metaboxer-list-item-add a,
|
271 |
-
.mtphr-dnt-metaboxer-list-item-delete a {
|
272 |
-
display: block;
|
273 |
-
text-indent: -9999px;
|
274 |
-
width: 16px;
|
275 |
-
height: 16px;
|
276 |
-
}
|
277 |
-
.mtphr-dnt-metaboxer-list-item-handle span {
|
278 |
-
background: url(images/arrow-resize-090.png) no-repeat top;
|
279 |
-
}
|
280 |
-
.mtphr-dnt-metaboxer-list-item-add a {
|
281 |
-
background: url(images/plus-circle.png) no-repeat top;
|
282 |
-
}
|
283 |
-
.mtphr-dnt-metaboxer-list-item-delete a {
|
284 |
-
background: url(images/minus-circle.png) no-repeat top;
|
285 |
-
}
|
286 |
-
.mtphr-dnt-metaboxer-list-item-handle span:hover,
|
287 |
-
.mtphr-dnt-metaboxer-list-item-add a:hover,
|
288 |
-
.mtphr-dnt-metaboxer-list-item-delete a:hover {
|
289 |
-
background-position: 0 -16px;
|
290 |
-
}
|
291 |
-
|
292 |
-
/* Radio
|
293 |
-
------------------------------------------------------------ */
|
294 |
-
|
295 |
-
.mtphr-team-members-metaboxer-radio input {
|
296 |
-
margin-top: 0;
|
297 |
-
margin-right: 1px;
|
298 |
-
}
|
299 |
-
|
300 |
-
/* Sorts
|
301 |
-
------------------------------------------------------------ */
|
302 |
-
|
303 |
-
.mtphr-dnt-metaboxer-sort td {
|
304 |
-
padding: 6px 3px;
|
305 |
-
border-bottom: 1px dashed #CCC;
|
306 |
-
}
|
307 |
-
.mtphr-dnt-metaboxer-sort td.mtphr-dnt-metaboxer-sort-name {
|
308 |
-
font-weight: bold;
|
309 |
-
padding-right: 10px;
|
310 |
-
}
|
311 |
-
.mtphr-dnt-metaboxer-sort td.mtphr-dnt-metaboxer-sort-item-handle {
|
312 |
-
width: 16px;
|
313 |
-
padding-top: 2px !important;
|
314 |
-
border: none;
|
315 |
-
}
|
316 |
-
.mtphr-dnt-metaboxer-sort-item-handle span {
|
317 |
-
display: block;
|
318 |
-
text-indent: -9999px;
|
319 |
-
width: 16px;
|
320 |
-
height: 16px;
|
321 |
-
background: url(images/arrow-resize-090.png) no-repeat top;
|
322 |
-
}
|
323 |
-
.mtphr-dnt-metaboxer-sort-item-handle span:hover {
|
324 |
-
background-position: 0 -16px;
|
325 |
-
}
|
326 |
-
|
327 |
-
/* Textarea - 1.0.1
|
328 |
-
------------------------------------------------------------ */
|
329 |
-
|
330 |
-
.mtphr-dnt-metaboxer-textarea textarea {
|
331 |
-
width: 96%;
|
332 |
-
}
|
333 |
-
|
334 |
-
/* WYSIWYG
|
335 |
-
------------------------------------------------------------ */
|
336 |
-
|
337 |
-
.mtphr-dnt-metaboxer-wysiwyg-placeholder {
|
338 |
-
background: #EFEFEF;
|
339 |
-
border: 1px dashed #CCC;
|
340 |
-
padding: 30px;
|
341 |
-
margin-bottom: 10px;
|
342 |
-
}
|
343 |
-
.mtphr-dnt-metaboxer-wysiwyg {
|
344 |
-
max-width: 800px;
|
345 |
-
}
|
346 |
-
.mtphr-dnt-metaboxer-wysiwyg .mceContentBody {
|
347 |
-
background: #FFF;
|
348 |
-
}
|
349 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/metaboxer/metaboxer.js
DELETED
@@ -1,426 +0,0 @@
|
|
1 |
-
jQuery(document).ready( function($) {
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Add code functionality.
|
7 |
-
*
|
8 |
-
* @since 1.0.0
|
9 |
-
*/
|
10 |
-
$('.mtphr-dnt-metaboxer-code-select').click( function(e) {
|
11 |
-
e.preventDefault();
|
12 |
-
|
13 |
-
var $pre = $(this).parents('.mtphr-dnt-metaboxer-code').find('pre');
|
14 |
-
var refNode = $pre[0];
|
15 |
-
if ( jQuery.browser.msie ) {
|
16 |
-
var range = document.body.createTextRange();
|
17 |
-
range.moveToElementText( refNode );
|
18 |
-
range.select();
|
19 |
-
} else if ( jQuery.browser.mozilla || jQuery.browser.opera ) {
|
20 |
-
var selection = window.getSelection();
|
21 |
-
var range = document.createRange();
|
22 |
-
range.selectNodeContents( refNode );
|
23 |
-
selection.removeAllRanges();
|
24 |
-
selection.addRange( range );
|
25 |
-
} else if ( jQuery.browser.safari || jQuery.browser.chrome ) {
|
26 |
-
var selection = window.getSelection();
|
27 |
-
selection.setBaseAndExtent( refNode, 0, refNode, 1 );
|
28 |
-
}
|
29 |
-
});
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
/**
|
34 |
-
* Add file functionality.
|
35 |
-
*
|
36 |
-
* @since 1.0.0
|
37 |
-
*/
|
38 |
-
$('.mtphr-dnt-metaboxer-file').each( function(index) {
|
39 |
-
|
40 |
-
// If there currently isn't a value, show the upload button
|
41 |
-
if( $(this).find('.mtphr-dnt-metaboxer-file-value').val() == '' ) {
|
42 |
-
$(this).find('.mtphr-dnt-metaboxer-file-upload').css('display','inline-block');
|
43 |
-
}
|
44 |
-
});
|
45 |
-
|
46 |
-
// Custom media upload functionality
|
47 |
-
$('.mtphr-dnt-metaboxer-file-upload').click(function() {
|
48 |
-
|
49 |
-
// Save the container
|
50 |
-
var $container = $(this).parent('.mtphr-dnt-metaboxer-file-contents');
|
51 |
-
|
52 |
-
var send_attachment_bkp = wp.media.editor.send.attachment;
|
53 |
-
|
54 |
-
wp.media.editor.send.attachment = function( props, attachment ) {
|
55 |
-
|
56 |
-
// Set the field value
|
57 |
-
$container.find('.mtphr-dnt-metaboxer-file-value').val(attachment.id);
|
58 |
-
|
59 |
-
// Create the display
|
60 |
-
var data = {
|
61 |
-
action: 'mtphr_dnt_metaboxer_ajax_file_display',
|
62 |
-
id: attachment.id,
|
63 |
-
type: attachment.type,
|
64 |
-
url: attachment.url,
|
65 |
-
title: attachment.title,
|
66 |
-
caption: attachment.caption,
|
67 |
-
description: attachment.description,
|
68 |
-
security: ditty_metaboxer_vars.security
|
69 |
-
};
|
70 |
-
|
71 |
-
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
72 |
-
jQuery.post( ajaxurl, data, function( response ) {
|
73 |
-
|
74 |
-
// Append the new data
|
75 |
-
$container.append( response );
|
76 |
-
|
77 |
-
// Hide the upload button
|
78 |
-
$container.find('.mtphr-dnt-metaboxer-file-upload').hide();
|
79 |
-
});
|
80 |
-
|
81 |
-
wp.media.editor.send.attachment = send_attachment_bkp;
|
82 |
-
}
|
83 |
-
|
84 |
-
wp.media.editor.open();
|
85 |
-
|
86 |
-
return false;
|
87 |
-
});
|
88 |
-
|
89 |
-
$('.mtphr-dnt-metaboxer-file-delete').live('click',function() {
|
90 |
-
|
91 |
-
// Save the container
|
92 |
-
var $container = $(this).parents('.mtphr-dnt-metaboxer-file-contents');
|
93 |
-
|
94 |
-
// Remove the field value
|
95 |
-
$container.find('.mtphr-dnt-metaboxer-file-value').val('');
|
96 |
-
|
97 |
-
// Remove the current display
|
98 |
-
$container.find('.mtphr-dnt-metaboxer-file-table').remove();
|
99 |
-
|
100 |
-
// Disply the upload button
|
101 |
-
$container.find('.mtphr-dnt-metaboxer-file-upload').css('display','inline-block');
|
102 |
-
});
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Add image functionality.
|
108 |
-
*
|
109 |
-
* @since 1.1.9
|
110 |
-
*/
|
111 |
-
$('.mtphr-dnt-metaboxer-image-contents').each( function(index) {
|
112 |
-
|
113 |
-
// If there currently isn't a value, show the upload button
|
114 |
-
if( $(this).find('.mtphr-dnt-metaboxer-image-value').val() == '' ) {
|
115 |
-
$(this).find('.mtphr-dnt-metaboxer-image-upload').css('display','inline-block');
|
116 |
-
}
|
117 |
-
});
|
118 |
-
|
119 |
-
// Image upload functionality
|
120 |
-
$('.mtphr-dnt-metaboxer-image-upload').click(function() {
|
121 |
-
|
122 |
-
// Save the container
|
123 |
-
var $container = $(this).parent('.mtphr-dnt-metaboxer-image-contents');
|
124 |
-
|
125 |
-
var send_attachment_bkp = wp.media.editor.send.attachment;
|
126 |
-
|
127 |
-
wp.media.editor.send.attachment = function( props, attachment ) {
|
128 |
-
|
129 |
-
// Set the field value
|
130 |
-
$container.find('.mtphr-dnt-metaboxer-image-value').val(attachment.id);
|
131 |
-
|
132 |
-
// Create the display
|
133 |
-
var data = {
|
134 |
-
action: 'mtphr_dnt_metaboxer_ajax_image_display',
|
135 |
-
id: attachment.id,
|
136 |
-
type: attachment.type,
|
137 |
-
url: attachment.url,
|
138 |
-
title: attachment.title,
|
139 |
-
caption: attachment.caption,
|
140 |
-
description: attachment.description,
|
141 |
-
security: ditty_metaboxer_vars.security
|
142 |
-
};
|
143 |
-
|
144 |
-
// since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
|
145 |
-
jQuery.post( ajaxurl, data, function( response ) {
|
146 |
-
|
147 |
-
// Append the new data
|
148 |
-
$container.append( response );
|
149 |
-
|
150 |
-
// Hide the upload button
|
151 |
-
$container.find('.mtphr-dnt-metaboxer-image-upload').hide();
|
152 |
-
});
|
153 |
-
|
154 |
-
wp.media.editor.send.attachment = send_attachment_bkp;
|
155 |
-
}
|
156 |
-
|
157 |
-
wp.media.editor.open($(this));
|
158 |
-
|
159 |
-
return false;
|
160 |
-
});
|
161 |
-
|
162 |
-
$('.mtphr-dnt-metaboxer-image-delete').live('click',function(e) {
|
163 |
-
e.preventDefault();
|
164 |
-
|
165 |
-
// Save the container
|
166 |
-
var $container = $(this).parents('.mtphr-dnt-metaboxer-image-contents');
|
167 |
-
|
168 |
-
// Remove the field value
|
169 |
-
$container.find('.mtphr-dnt-metaboxer-image-value').val('');
|
170 |
-
|
171 |
-
// Remove the current display
|
172 |
-
$container.find('.mtphr-dnt-metaboxer-image-table').remove();
|
173 |
-
|
174 |
-
// Disply the upload button
|
175 |
-
$container.find('.mtphr-dnt-metaboxer-image-upload').css('display','inline-block');
|
176 |
-
});
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Add image select functionality.
|
182 |
-
*
|
183 |
-
* @since 1.0
|
184 |
-
*/
|
185 |
-
$('.mtphr-dnt-metaboxer-image-select-link').click( function(e) {
|
186 |
-
|
187 |
-
e.preventDefault();
|
188 |
-
|
189 |
-
// Get the value
|
190 |
-
var val = $(this).attr('href');
|
191 |
-
|
192 |
-
// Save the value to the input
|
193 |
-
$(this).siblings('input[type="hidden"]').val(val);
|
194 |
-
|
195 |
-
// Set & remove selected
|
196 |
-
$(this).siblings('.mtphr-dnt-metaboxer-image-select-link').removeClass('selected');
|
197 |
-
$(this).addClass('selected');
|
198 |
-
});
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Add list functionality.
|
204 |
-
*
|
205 |
-
* @since 1.0.0
|
206 |
-
*/
|
207 |
-
$('.mtphr-dnt-metaboxer-list').each( function(index) {
|
208 |
-
|
209 |
-
// Set the field order
|
210 |
-
mtphr_dnt_metaboxer_lists_set_order( $(this) );
|
211 |
-
|
212 |
-
// Add sorting to the items
|
213 |
-
mtphr_dnt_metaboxer_lists_set_sortable( $(this) );
|
214 |
-
});
|
215 |
-
|
216 |
-
// List - add sorting to the items
|
217 |
-
function mtphr_dnt_metaboxer_lists_set_sortable( $list ) {
|
218 |
-
|
219 |
-
$list.sortable( {
|
220 |
-
handle: '.mtphr-dnt-metaboxer-list-item-handle',
|
221 |
-
items: '.mtphr-dnt-metaboxer-list-item',
|
222 |
-
axis: 'y',
|
223 |
-
helper: function(e, tr) {
|
224 |
-
var $originals = tr.children();
|
225 |
-
var $helper = tr.clone();
|
226 |
-
$helper.children().each(function(index) {
|
227 |
-
// Set helper cell sizes to match the original sizes
|
228 |
-
$(this).width($originals.eq(index).width())
|
229 |
-
});
|
230 |
-
return $helper;
|
231 |
-
},
|
232 |
-
update: function( event, ui ) {
|
233 |
-
|
234 |
-
// Set the field order
|
235 |
-
mtphr_dnt_metaboxer_lists_set_order( $(this) );
|
236 |
-
}
|
237 |
-
});
|
238 |
-
}
|
239 |
-
|
240 |
-
// List - set the list item order
|
241 |
-
function mtphr_dnt_metaboxer_lists_set_order( $list ) {
|
242 |
-
|
243 |
-
// Set the order of the items
|
244 |
-
$list.find('.mtphr-dnt-metaboxer-list-item').each( function(i) {
|
245 |
-
|
246 |
-
$(this).find('.mtphr-dnt-metaboxer-list-structure-item').each( function(e) {
|
247 |
-
|
248 |
-
var base = $(this).attr('base');
|
249 |
-
var field = $(this).attr('field');
|
250 |
-
$(this).find('input,textarea,select').attr('name', base+'['+i+']['+field+']');
|
251 |
-
});
|
252 |
-
});
|
253 |
-
|
254 |
-
// Hide the delete if only one element
|
255 |
-
if( $list.find('.mtphr-dnt-metaboxer-list-item').length == 1 ) {
|
256 |
-
|
257 |
-
$list.find('.mtphr-dnt-metaboxer-list-item-handle,.mtphr-dnt-metaboxer-list-item-delete').hide();
|
258 |
-
}
|
259 |
-
}
|
260 |
-
|
261 |
-
// List - add item click
|
262 |
-
$('.mtphr-dnt-metaboxer-list-item-add').live( 'click', function(e) {
|
263 |
-
e.preventDefault();
|
264 |
-
|
265 |
-
// Create a new item with blank content
|
266 |
-
var $parent = $(this).parents('.mtphr-dnt-metaboxer-list-item');
|
267 |
-
var $new = $parent.clone(true).hide();
|
268 |
-
|
269 |
-
if( $new.find('.wp-editor-wrap').length > 0 ) {
|
270 |
-
var $container = $new.find('.wp-editor-wrap').parent();
|
271 |
-
$new.find('.wp-editor-wrap').remove();
|
272 |
-
$container.append('<div class="mtphr-dnt-metaboxer-wysiwyg-placeholder">You must <strong>save your page</strong> to use this editor.</div>');
|
273 |
-
}
|
274 |
-
|
275 |
-
$new.find('input,textarea,select').removeAttr('value').removeAttr('checked').removeAttr('selected');
|
276 |
-
$parent.after($new);
|
277 |
-
$new.fadeIn().css('display', 'table-row');
|
278 |
-
|
279 |
-
// Set the field order
|
280 |
-
mtphr_dnt_metaboxer_lists_set_order( $(this).parents('.mtphr-dnt-metaboxer-list') );
|
281 |
-
|
282 |
-
// Show the handles
|
283 |
-
$(this).parents('.mtphr-dnt-metaboxer-list').find('.mtphr-dnt-metaboxer-list-item-handle,.mtphr-dnt-metaboxer-list-item-delete').show();
|
284 |
-
|
285 |
-
// Set the focus to the new input
|
286 |
-
var inputs = $new.find('input,textarea,select');
|
287 |
-
$(inputs[0]).focus();
|
288 |
-
});
|
289 |
-
|
290 |
-
// List - delete item click
|
291 |
-
$('.mtphr-dnt-metaboxer-list-item-delete').live( 'click', function(e) {
|
292 |
-
e.preventDefault();
|
293 |
-
|
294 |
-
// Fade out the item
|
295 |
-
$(this).parents('.mtphr-dnt-metaboxer-list-item').fadeOut( function() {
|
296 |
-
|
297 |
-
// Get the list
|
298 |
-
var $list = $(this).parents('.mtphr-dnt-metaboxer-list');
|
299 |
-
|
300 |
-
// Remove the item
|
301 |
-
$(this).remove();
|
302 |
-
|
303 |
-
// Set the field order
|
304 |
-
mtphr_dnt_metaboxer_lists_set_order( $list );
|
305 |
-
});
|
306 |
-
});
|
307 |
-
|
308 |
-
// List - handle hover
|
309 |
-
$('.mtphr-dnt-metaboxer-list-item-handle').live( 'hover', function() {
|
310 |
-
mtphr_dnt_metaboxer_lists_set_sortable( $(this).parents('.mtphr-dnt-metaboxer-list') );
|
311 |
-
});
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
/**
|
316 |
-
* Add metabox toggle functionality.
|
317 |
-
*
|
318 |
-
* @since 1.0.0
|
319 |
-
*/
|
320 |
-
$('.mtphr-dnt-metaboxer-field-metabox_toggle').each( function(index) {
|
321 |
-
|
322 |
-
// Create an array to store all the toggled metaboxes
|
323 |
-
var metaboxes = Array();
|
324 |
-
$(this).find('.mtphr-dnt-metaboxer-metabox-toggle').each( function(index) {
|
325 |
-
|
326 |
-
// Get the metaboxes and merge into the main array
|
327 |
-
var m = $(this).attr('metaboxes').split(',');
|
328 |
-
$.merge( metaboxes, m );
|
329 |
-
});
|
330 |
-
var total_metaboxes = metaboxes.length;
|
331 |
-
|
332 |
-
// Hide the toggled metaboxes
|
333 |
-
mtphr_dnt_metaboxer_metabox_hide();
|
334 |
-
|
335 |
-
// Display the current metaboxes
|
336 |
-
if( $(this).find('.mtphr-dnt-metaboxer-metabox-toggle.button-primary').length > 0 ) {
|
337 |
-
$init_button = $(this).find('.mtphr-dnt-metaboxer-metabox-toggle.button-primary');
|
338 |
-
} else {
|
339 |
-
$init_button = $(this).find('.mtphr-dnt-metaboxer-metabox-toggle:first');
|
340 |
-
$init_button.addClass('button-primary');
|
341 |
-
}
|
342 |
-
mtphr_dnt_metaboxer_metabox_show( $init_button );
|
343 |
-
|
344 |
-
// Hide the toggled metaboxes
|
345 |
-
function mtphr_dnt_metaboxer_metabox_hide() {
|
346 |
-
for( var i=0; i<total_metaboxes; i++ ) {
|
347 |
-
$('#'+metaboxes[i]).hide();
|
348 |
-
$('input[name="'+metaboxes[i]+'-hide"]').removeAttr('checked');
|
349 |
-
}
|
350 |
-
}
|
351 |
-
|
352 |
-
// Show the selected metaboxes
|
353 |
-
function mtphr_dnt_metaboxer_metabox_show( $button ) {
|
354 |
-
|
355 |
-
// Get and display the selected metaboxes
|
356 |
-
var m = $button.attr('metaboxes').split(',');
|
357 |
-
var t = m.length;
|
358 |
-
|
359 |
-
// Show all the toggled metaboxes
|
360 |
-
for( var i=0; i<t; i++ ) {
|
361 |
-
$('#'+m[i]).show();
|
362 |
-
$('input[name="'+m[i]+'-hide"]').attr('checked', 'checked');
|
363 |
-
}
|
364 |
-
|
365 |
-
// Store the new value
|
366 |
-
$button.siblings('input').val($button.attr('href'));
|
367 |
-
}
|
368 |
-
|
369 |
-
// Select the code on button click
|
370 |
-
$(this).find('.mtphr-dnt-metaboxer-metabox-toggle').click( function(e) {
|
371 |
-
e.preventDefault();
|
372 |
-
|
373 |
-
// Hide all the toggled metaboxes
|
374 |
-
mtphr_dnt_metaboxer_metabox_hide();
|
375 |
-
|
376 |
-
// Show the selected metaboxes
|
377 |
-
mtphr_dnt_metaboxer_metabox_show( $(this) );
|
378 |
-
|
379 |
-
// Set the button classes
|
380 |
-
$(this).siblings('.mtphr-dnt-metaboxer-metabox-toggle').removeClass('button-primary');
|
381 |
-
$(this).addClass('button-primary');
|
382 |
-
});
|
383 |
-
});
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
/**
|
388 |
-
* Add sort functionality.
|
389 |
-
*
|
390 |
-
* @since 1.0.1
|
391 |
-
*/
|
392 |
-
$('.mtphr-dnt-metaboxer-sort').each( function(index) {
|
393 |
-
|
394 |
-
// Add sorting to the items
|
395 |
-
$(this).sortable( {
|
396 |
-
handle: '.mtphr-dnt-metaboxer-sort-item-handle',
|
397 |
-
items: '.mtphr-dnt-metaboxer-sort-item',
|
398 |
-
axis: 'y',
|
399 |
-
update: function( event, ui ) {
|
400 |
-
}
|
401 |
-
});
|
402 |
-
});
|
403 |
-
|
404 |
-
|
405 |
-
/* --------------------------------------------------------- */
|
406 |
-
/* !Add codemirror css editor - 1.2.1 */
|
407 |
-
/* --------------------------------------------------------- */
|
408 |
-
|
409 |
-
$('.mtphr-dnt-custom-css').each( function(i) {
|
410 |
-
|
411 |
-
var $textarea = $(this).find('textarea');
|
412 |
-
var myCodeMirror = CodeMirror.fromTextArea($textarea[0], {
|
413 |
-
'mode' : 'css',
|
414 |
-
'lineNumbers' : true,
|
415 |
-
'lineWrapping' : true
|
416 |
-
});
|
417 |
-
myCodeMirror.setSize( false, 300 );
|
418 |
-
});
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/metaboxer/metaboxer.php
DELETED
@@ -1,759 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Put all the Metaboxer admin function here fields here
|
4 |
-
*
|
5 |
-
* @package Ditty News Ticker
|
6 |
-
* @author Metaphor Creations
|
7 |
-
* @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
|
8 |
-
*/
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Create a field container and switch.
|
14 |
-
*
|
15 |
-
* @since 1.0.0
|
16 |
-
*/
|
17 |
-
function mtphr_dnt_metaboxer_container( $field, $context ) {
|
18 |
-
|
19 |
-
global $post;
|
20 |
-
|
21 |
-
$default = isset( $field['default'] ) ? $field['default'] : '';
|
22 |
-
$value = ( get_post_meta( $post->ID, $field['id'], true ) != '' ) ? get_post_meta( $post->ID, $field['id'], true ) : $default;
|
23 |
-
$display = isset( $field['display'] ) ? $field['display'] : '';
|
24 |
-
?>
|
25 |
-
<tr class="mtphr-dnt-metaboxer-field mtphr-dnt-metaboxer-field-<?php echo $field['type']; ?> mtphr-dnt-metaboxer<?php echo $field['id']; ?><?php if( isset($field['class']) ) { echo ' '.$field['class']; } ?> clearfix">
|
26 |
-
|
27 |
-
<?php
|
28 |
-
$content_class = 'mtphr-dnt-metaboxer-field-content mtphr-dnt-metaboxer-field-content-full mtphr-dnt-metaboxer-'.$field['type'].' clearfix';
|
29 |
-
$content_span = ' colspan="2"';
|
30 |
-
$label = false;
|
31 |
-
|
32 |
-
if ( isset($field['name']) || isset($field['description']) ) {
|
33 |
-
|
34 |
-
$content_class = 'mtphr-dnt-metaboxer-field-content mtphr-dnt-metaboxer-'.$field['type'].' clearfix';
|
35 |
-
$content_span = '';
|
36 |
-
$label = true;
|
37 |
-
?>
|
38 |
-
|
39 |
-
<?php if( $context == 'side' || $display == 'vertical' ) { ?><td><table><tr><?php } ?>
|
40 |
-
|
41 |
-
<td class="mtphr-dnt-metaboxer-label">
|
42 |
-
<?php if( isset($field['name']) ) { ?><label for="<?php echo $field['id']; ?>"><?php echo $field['name']; ?></label><?php } ?>
|
43 |
-
<?php if( isset($field['description']) ) { ?><small><?php echo $field['description']; ?></small><?php } ?>
|
44 |
-
</td>
|
45 |
-
|
46 |
-
<?php if( $context == 'side' || $display == 'vertical' ) { echo '</tr>'; } ?>
|
47 |
-
|
48 |
-
<?php
|
49 |
-
}
|
50 |
-
?>
|
51 |
-
|
52 |
-
<?php if( $label ) { if( $context == 'side' || $display == 'vertical' ) { echo '<tr>'; } } ?>
|
53 |
-
|
54 |
-
<td<?php echo $content_span; ?> class="<?php echo $content_class; ?>" id="<?php echo $post->ID; ?>">
|
55 |
-
<?php
|
56 |
-
// Call the function to display the field
|
57 |
-
if ( function_exists('mtphr_dnt_metaboxer_'.$field['type']) ) {
|
58 |
-
call_user_func( 'mtphr_dnt_metaboxer_'.$field['type'], $field, $value );
|
59 |
-
}
|
60 |
-
?>
|
61 |
-
</td>
|
62 |
-
|
63 |
-
<?php if( $label ) { if( $context == 'side' || $display == 'vertical' ) { echo '</tr></table></td>'; } } ?>
|
64 |
-
|
65 |
-
</tr>
|
66 |
-
<?php
|
67 |
-
}
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Append fields
|
74 |
-
*
|
75 |
-
* @since 1.0.0
|
76 |
-
*/
|
77 |
-
function mtphr_dnt_metaboxer_append_field( $field ) {
|
78 |
-
|
79 |
-
// Add appended fields
|
80 |
-
if( isset($field['append']) ) {
|
81 |
-
|
82 |
-
$fields = $field['append'];
|
83 |
-
$settings = ( isset($field['option'] ) ) ? $field['option'] : false;
|
84 |
-
|
85 |
-
if( is_array($fields) ) {
|
86 |
-
|
87 |
-
foreach( $fields as $id => $field ) {
|
88 |
-
|
89 |
-
// Get the value
|
90 |
-
if( $settings) {
|
91 |
-
$options = get_option( $settings );
|
92 |
-
$value = isset( $options[$id] ) ? $options[$id] : get_option( $id );
|
93 |
-
} else {
|
94 |
-
global $post;
|
95 |
-
$value = get_post_meta( $post->ID, $id, true );
|
96 |
-
}
|
97 |
-
|
98 |
-
// Set the default if no value
|
99 |
-
if( $value == '' && isset($field['default']) ) {
|
100 |
-
$value = $field['default'];
|
101 |
-
}
|
102 |
-
|
103 |
-
if( isset($field['type']) ) {
|
104 |
-
|
105 |
-
if( $settings ) {
|
106 |
-
$field['id'] = $settings.'['.$id.']';
|
107 |
-
$field['option'] = $settings;
|
108 |
-
} else {
|
109 |
-
$field['id'] = $id;
|
110 |
-
}
|
111 |
-
|
112 |
-
// Call the function to display the field
|
113 |
-
if ( function_exists('mtphr_dnt_metaboxer_'.$field['type']) ) {
|
114 |
-
echo '<div class="mtphr-dnt-metaboxer-appended mtphr-dnt-metaboxer'.$field['id'].'">';
|
115 |
-
call_user_func( 'mtphr_dnt_metaboxer_'.$field['type'], $field, $value );
|
116 |
-
echo '</div>';
|
117 |
-
}
|
118 |
-
}
|
119 |
-
}
|
120 |
-
}
|
121 |
-
}
|
122 |
-
}
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
/**
|
128 |
-
* Renders a checkbox.
|
129 |
-
*
|
130 |
-
* @since 1.0.0
|
131 |
-
*/
|
132 |
-
function mtphr_dnt_metaboxer_checkbox( $field, $value='' ) {
|
133 |
-
|
134 |
-
$output = '';
|
135 |
-
$before = ( isset($field['before']) ) ? '<span>'.$field['before'].' </span>' : '';
|
136 |
-
$after = ( isset($field['after']) ) ? '<span> '.$field['after'].'</span>' : '';
|
137 |
-
|
138 |
-
if( isset($field['options']) ) {
|
139 |
-
|
140 |
-
$break = '<br/>';
|
141 |
-
if ( isset($field['display']) ) {
|
142 |
-
if( $field['display'] == 'inline' ) {
|
143 |
-
$break = ' ';
|
144 |
-
}
|
145 |
-
}
|
146 |
-
foreach( $field['options'] as $i => $option ) {
|
147 |
-
$checked = ( isset($value[$i]) ) ? 'checked="checked"' : '';
|
148 |
-
$output .= '<label><input name="'.$field['id'].'['.$i.']" id="'.$field['id'].'['.$i.']" type="checkbox" value="1" '.$checked.' /> '.$option.'</label>'.$break;
|
149 |
-
}
|
150 |
-
|
151 |
-
} else {
|
152 |
-
|
153 |
-
$checked = ( $value == 1 ) ? 'checked="checked"' : '';
|
154 |
-
$output .= '<label><input name="'.$field['id'].'" id="'.$field['id'].'" type="checkbox" value="1" '.$checked.' />';
|
155 |
-
if( isset($field['label']) ) {
|
156 |
-
$output .= ' '.$field['label'];
|
157 |
-
}
|
158 |
-
$output .= '</label>';
|
159 |
-
}
|
160 |
-
|
161 |
-
echo $before.$output.$after;
|
162 |
-
|
163 |
-
// Add appended fields
|
164 |
-
mtphr_dnt_metaboxer_append_field($field);
|
165 |
-
}
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
/**
|
170 |
-
* Renders a file attachment
|
171 |
-
*
|
172 |
-
* @since 1.0.0
|
173 |
-
*/
|
174 |
-
function mtphr_dnt_metaboxer_file( $field, $value='' ) {
|
175 |
-
|
176 |
-
// Check if there's actually a file
|
177 |
-
$file = false;
|
178 |
-
if( $value != '' ) {
|
179 |
-
$file = get_post( $value );
|
180 |
-
}
|
181 |
-
|
182 |
-
// If there isn't a file reset the value
|
183 |
-
if( !$file ) {
|
184 |
-
$value = '';
|
185 |
-
}
|
186 |
-
?>
|
187 |
-
|
188 |
-
<input class="mtphr-dnt-metaboxer-file-value" type="hidden" id="<?php echo $field['id']; ?>" name="<?php echo $field['id']; ?>" value="<?php echo $value; ?>" />
|
189 |
-
|
190 |
-
<?php
|
191 |
-
echo isset( $field['button'] ) ? '<a href="#" class="button mtphr-dnt-metaboxer-file-upload">'.$field['button'].'</a>' : '<a href="#" class="button custom-media-upload">Insert File</a>';
|
192 |
-
|
193 |
-
if( $file ) {
|
194 |
-
|
195 |
-
$type = explode( '/', $file->post_mime_type );
|
196 |
-
|
197 |
-
// Display the file
|
198 |
-
echo mtphr_dnt_metaboxer_file_display( $file->ID, $type[0], $file->guid, $file->post_title, $file -> post_excerpt, $file->post_content );
|
199 |
-
}
|
200 |
-
|
201 |
-
// Add appended fields
|
202 |
-
mtphr_dnt_metaboxer_append_field($field);
|
203 |
-
}
|
204 |
-
|
205 |
-
add_action( 'wp_ajax_mtphr_dnt_metaboxer_ajax_file_display', 'mtphr_dnt_metaboxer_ajax_file_display' );
|
206 |
-
/**
|
207 |
-
* Ajax function used to delete attachments
|
208 |
-
*
|
209 |
-
* @since 1.0.0
|
210 |
-
*/
|
211 |
-
function mtphr_dnt_metaboxer_ajax_file_display() {
|
212 |
-
|
213 |
-
// Get access to the database
|
214 |
-
global $wpdb;
|
215 |
-
|
216 |
-
// Check the nonce
|
217 |
-
check_ajax_referer( 'mtphr_dnt', 'security' );
|
218 |
-
|
219 |
-
// Get variables
|
220 |
-
$id = $_POST['id'];
|
221 |
-
$type = $_POST['type'];
|
222 |
-
$url = $_POST['url'];
|
223 |
-
$title = $_POST['title'];
|
224 |
-
$caption = $_POST['caption'];
|
225 |
-
$description = $_POST['description'];
|
226 |
-
|
227 |
-
// Display the file
|
228 |
-
mtphr_dnt_metaboxer_file_display( $id, $type, $url, $title, $caption, $description );
|
229 |
-
|
230 |
-
die(); // this is required to return a proper result
|
231 |
-
}
|
232 |
-
|
233 |
-
// Display the file
|
234 |
-
function mtphr_dnt_metaboxer_file_display( $id, $type, $url, $title, $caption, $description ) {
|
235 |
-
|
236 |
-
$src = '';
|
237 |
-
switch( $type ) {
|
238 |
-
|
239 |
-
case 'image':
|
240 |
-
$att = wp_get_attachment_image_src( $id, 'thumbnail' );
|
241 |
-
$src = $att[0];
|
242 |
-
break;
|
243 |
-
|
244 |
-
case 'application':
|
245 |
-
$att = wp_get_attachment_image_src( $id, 'thumbnail', true );
|
246 |
-
$src = $att[0];
|
247 |
-
break;
|
248 |
-
}
|
249 |
-
?>
|
250 |
-
<table class="mtphr-dnt-metaboxer-file-table">
|
251 |
-
<tr>
|
252 |
-
<td class="mtphr-dnt-metaboxer-file-display">
|
253 |
-
<a href="<?php echo $url; ?>" target="_blank" class="clearfix">
|
254 |
-
<img class="custom_media_image" src="<?php echo $src; ?>" />
|
255 |
-
<span class="mtphr-dnt-metaboxer-file-title"><strong>Title:</strong> <?php echo $title; ?></span><br/>
|
256 |
-
<?php if( $caption != '' ) { ?>
|
257 |
-
<span class="mtphr-dnt-metaboxer-file-caption"><strong>Caption:</strong> <?php echo $caption; ?></span><br/>
|
258 |
-
<?php }
|
259 |
-
if( $description != '' ) { ?>
|
260 |
-
<span class="mtphr-dnt-metaboxer-file-description"><strong>Description:</strong> <?php echo $description; ?></span>
|
261 |
-
<?php } ?>
|
262 |
-
</a>
|
263 |
-
</td>
|
264 |
-
<td class="mtphr-dnt-metaboxer-file-delete">
|
265 |
-
<a href="#"></a>
|
266 |
-
</td>
|
267 |
-
</tr>
|
268 |
-
</table>
|
269 |
-
<?php
|
270 |
-
}
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
/**
|
275 |
-
* Renders an html field.
|
276 |
-
*
|
277 |
-
* @since 1.0.0
|
278 |
-
*/
|
279 |
-
function mtphr_dnt_metaboxer_html( $field, $value='' ) {
|
280 |
-
|
281 |
-
// Echo the html
|
282 |
-
echo $value;
|
283 |
-
|
284 |
-
// Add appended fields
|
285 |
-
mtphr_dnt_metaboxer_append_field($field);
|
286 |
-
}
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
/**
|
291 |
-
* Renders an image attachment
|
292 |
-
*
|
293 |
-
* @since 1.1.9
|
294 |
-
*/
|
295 |
-
function mtphr_dnt_metaboxer_image( $field, $value='' ) {
|
296 |
-
|
297 |
-
// Check if there's actually a file
|
298 |
-
$image = false;
|
299 |
-
if( $value != '' ) {
|
300 |
-
$image = get_post( $value );
|
301 |
-
}
|
302 |
-
if( !$image ) {
|
303 |
-
$value = '';
|
304 |
-
}
|
305 |
-
?>
|
306 |
-
<div class="mtphr-dnt-metaboxer-image-contents">
|
307 |
-
<input class="mtphr-dnt-metaboxer-image-value" type="hidden" id="<?php echo $field['id']; ?>" name="<?php echo $field['id']; ?>" value="<?php echo $value; ?>" />
|
308 |
-
<?php
|
309 |
-
echo isset( $field['button'] ) ? '<a href="#" class="button mtphr-dnt-metaboxer-image-upload">'.$field['button'].'</a>' : '<a href="#" class="button mtphr-dnt-metaboxer-image-upload">Insert Image</a>';
|
310 |
-
|
311 |
-
if( $image ) {
|
312 |
-
$type = explode( '/', $image->post_mime_type );
|
313 |
-
echo mtphr_dnt_metaboxer_image_display( $image->ID, $type[0], $image->guid, $image->post_title, $image -> post_excerpt, $image->post_content );
|
314 |
-
}
|
315 |
-
?>
|
316 |
-
|
317 |
-
</div>
|
318 |
-
|
319 |
-
<?php
|
320 |
-
// Add appended fields
|
321 |
-
mtphr_dnt_metaboxer_append_field($field);
|
322 |
-
}
|
323 |
-
|
324 |
-
add_action( 'wp_ajax_mtphr_dnt_metaboxer_ajax_image_display', 'mtphr_dnt_metaboxer_ajax_image_display' );
|
325 |
-
/**
|
326 |
-
* Ajax function used to display image
|
327 |
-
*
|
328 |
-
* @since 1.1.9
|
329 |
-
*/
|
330 |
-
function mtphr_dnt_metaboxer_ajax_image_display() {
|
331 |
-
|
332 |
-
// Get access to the database
|
333 |
-
global $wpdb;
|
334 |
-
|
335 |
-
// Check the nonce
|
336 |
-
check_ajax_referer( 'ditty-metaboxer', 'security' );
|
337 |
-
|
338 |
-
// Get variables
|
339 |
-
$id = $_POST['id'];
|
340 |
-
$type = $_POST['type'];
|
341 |
-
$url = $_POST['url'];
|
342 |
-
$title = $_POST['title'];
|
343 |
-
$caption = $_POST['caption'];
|
344 |
-
$description = $_POST['description'];
|
345 |
-
|
346 |
-
// Display the file
|
347 |
-
mtphr_dnt_metaboxer_image_display( $id, $type, $url, $title, $caption, $description );
|
348 |
-
|
349 |
-
die(); // this is required to return a proper result
|
350 |
-
}
|
351 |
-
|
352 |
-
// Display the file
|
353 |
-
function mtphr_dnt_metaboxer_image_display( $id, $type, $url, $title, $caption, $description ) {
|
354 |
-
|
355 |
-
$src = '';
|
356 |
-
switch( $type ) {
|
357 |
-
|
358 |
-
case 'image':
|
359 |
-
$att = wp_get_attachment_image_src( $id, 'thumbnail' );
|
360 |
-
$src = $att[0];
|
361 |
-
break;
|
362 |
-
|
363 |
-
case 'application':
|
364 |
-
$att = wp_get_attachment_image_src( $id, 'thumbnail', true );
|
365 |
-
$src = $att[0];
|
366 |
-
break;
|
367 |
-
}
|
368 |
-
?>
|
369 |
-
<table class="mtphr-dnt-metaboxer-image-table">
|
370 |
-
<tr>
|
371 |
-
<td class="mtphr-dnt-metaboxer-image-display">
|
372 |
-
<a href="<?php echo esc_url( get_edit_post_link( $id ) ) ?>" target="_blank" class="clearfix">
|
373 |
-
<img src="<?php echo $src; ?>" />
|
374 |
-
</a>
|
375 |
-
</td>
|
376 |
-
<td class="mtphr-dnt-metaboxer-image-delete">
|
377 |
-
<a href="#"></a>
|
378 |
-
</td>
|
379 |
-
</tr>
|
380 |
-
</table>
|
381 |
-
<?php
|
382 |
-
}
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
/**
|
391 |
-
* Renders an image select
|
392 |
-
*
|
393 |
-
* @since 1.0.0
|
394 |
-
*/
|
395 |
-
function mtphr_dnt_metaboxer_image_select( $field, $value='' ) {
|
396 |
-
$output = '<input type="hidden" id="'.$field['id'].'" name="'.$field['id'].'" value="'.$value.'" />';
|
397 |
-
foreach ( $field['options'] as $option ) {
|
398 |
-
$selected = ( $value == $option['value'] ) ? 'selected' : '';
|
399 |
-
$output .= '<a class="mtphr-dnt-metaboxer-image-select-link '.$selected.'" href="'.$option['value'].'"><img src="'.$option['path'].'" /><small>'.$option['label'].'</small></a>';
|
400 |
-
}
|
401 |
-
echo $output;
|
402 |
-
|
403 |
-
// Add appended fields
|
404 |
-
mtphr_dnt_metaboxer_append_field($field);
|
405 |
-
}
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
/**
|
410 |
-
* Renders a list.
|
411 |
-
*
|
412 |
-
* @since 1.0.2
|
413 |
-
*/
|
414 |
-
function mtphr_dnt_metaboxer_list( $field, $value='' ) {
|
415 |
-
|
416 |
-
$output = '<table>';
|
417 |
-
|
418 |
-
$headers = false;
|
419 |
-
$header_str = '';
|
420 |
-
foreach( $field['structure'] as $id => $str ) {
|
421 |
-
|
422 |
-
$header_str .= '<th>';
|
423 |
-
if( isset($str['header']) ) {
|
424 |
-
$headers = true;
|
425 |
-
$header_str .= $str['header'];
|
426 |
-
}
|
427 |
-
$header_str .= '</th>';
|
428 |
-
}
|
429 |
-
if( $headers ) {
|
430 |
-
$output .= '<tr><td class="mtphr-dnt-metaboxer-list-item-handle"></td>'.$header_str.'</tr>';
|
431 |
-
}
|
432 |
-
|
433 |
-
$buttons = '<td class="mtphr-dnt-metaboxer-list-item-delete"><a href="#">Delete</a></td><td class="mtphr-dnt-metaboxer-list-item-add"><a href="#">Add</a></td>';
|
434 |
-
if( is_array($value) ) {
|
435 |
-
foreach( $value as $i=>$v ) {
|
436 |
-
$structure = mtphr_dnt_metaboxer_list_structure( $i, $field, $v );
|
437 |
-
$output .= '<tr class="mtphr-dnt-metaboxer-list-item"><td class="mtphr-dnt-metaboxer-list-item-handle"><span></span></td>'.$structure.$buttons.'</tr>';
|
438 |
-
}
|
439 |
-
}
|
440 |
-
|
441 |
-
// If nothing is being output make sure one field is showing
|
442 |
-
if( $value == '' || count($value) == 0 ) {
|
443 |
-
$structure = mtphr_dnt_metaboxer_list_structure( 0, $field );
|
444 |
-
$output .= '<tr class="mtphr-dnt-metaboxer-list-item"><td class="mtphr-dnt-metaboxer-list-item-handle"><span></span></td>'.$structure.$buttons.'</tr>';
|
445 |
-
}
|
446 |
-
|
447 |
-
$output .= '</table>';
|
448 |
-
|
449 |
-
echo $output;
|
450 |
-
|
451 |
-
// Add appended fields
|
452 |
-
mtphr_dnt_metaboxer_append_field($field);
|
453 |
-
}
|
454 |
-
|
455 |
-
// Add the list structure
|
456 |
-
function mtphr_dnt_metaboxer_list_structure( $pos, $fields, $m_value='' ) {
|
457 |
-
|
458 |
-
$main_id = $fields['id'];
|
459 |
-
|
460 |
-
// Add appended fields
|
461 |
-
if( isset($fields['structure']) ) {
|
462 |
-
|
463 |
-
$fields = $fields['structure'];
|
464 |
-
$settings = ( isset($fields['option'] ) ) ? $fields['option'] : false;
|
465 |
-
|
466 |
-
if( is_array($fields) ) {
|
467 |
-
|
468 |
-
ob_start();
|
469 |
-
|
470 |
-
foreach( $fields as $id => $field ) {
|
471 |
-
|
472 |
-
// Get the value
|
473 |
-
$value = isset($m_value[$id]) ? $m_value[$id] : '';
|
474 |
-
|
475 |
-
// Get the width
|
476 |
-
$width = isset($field['width']) ? ' style="width:'.$field['width'].'"' : '';
|
477 |
-
|
478 |
-
if( isset($field['type']) ) {
|
479 |
-
|
480 |
-
$field['id'] = $main_id.'['.$pos.']['.$id.']';
|
481 |
-
|
482 |
-
// Call the function to display the field
|
483 |
-
if ( function_exists('mtphr_dnt_metaboxer_'.$field['type']) ) {
|
484 |
-
|
485 |
-
echo '<td'.$width.' class="mtphr-dnt-metaboxer-list-structure-item mtphr-dnt-metaboxer'.$main_id.'-'.$id.'" base="'.$main_id.'" field="'.$id.'">';
|
486 |
-
call_user_func( 'mtphr_dnt_metaboxer_'.$field['type'], $field, $value );
|
487 |
-
echo '</td>';
|
488 |
-
}
|
489 |
-
}
|
490 |
-
}
|
491 |
-
|
492 |
-
return ob_get_clean();
|
493 |
-
}
|
494 |
-
}
|
495 |
-
}
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
/**
|
500 |
-
* Renders a metabox toggle.
|
501 |
-
*
|
502 |
-
* @since 1.0.0
|
503 |
-
*/
|
504 |
-
function mtphr_dnt_metaboxer_metabox_toggle( $field, $value='' ) {
|
505 |
-
|
506 |
-
if( isset($field['options']) ) {
|
507 |
-
|
508 |
-
$output = '';
|
509 |
-
$output .= '<input type="hidden" id="'.$field['id'].'" name="'.$field['id'].'" value="'.$value.'" />';
|
510 |
-
|
511 |
-
foreach( $field['options'] as $i => $option ) {
|
512 |
-
|
513 |
-
$button = $option['button'];
|
514 |
-
$metaboxes = $option['metaboxes'];
|
515 |
-
$metabox_list = join( ',', $metaboxes );
|
516 |
-
|
517 |
-
// Create a button
|
518 |
-
$selected = ( $value == $i ) ? ' button-primary' : '';
|
519 |
-
$output .= '<a href="'.$i.'" metaboxes="'.$metabox_list.'" class="mtphr-dnt-metaboxer-metabox-toggle button'.$selected.'">'.$button.'</a> ';
|
520 |
-
}
|
521 |
-
|
522 |
-
echo $output;
|
523 |
-
}
|
524 |
-
|
525 |
-
// Add appended fields
|
526 |
-
mtphr_dnt_metaboxer_append_field($field);
|
527 |
-
}
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
/**
|
532 |
-
* Renders an number field.
|
533 |
-
*
|
534 |
-
* @since 1.0.0
|
535 |
-
*/
|
536 |
-
function mtphr_dnt_metaboxer_number( $field, $value='' ) {
|
537 |
-
$style = ( isset($field['style']) ) ? ' style="'.$field['style'].'"' : '';
|
538 |
-
$before = ( isset($field['before']) ) ? '<span>'.$field['before'].' </span>' : '';
|
539 |
-
$after = ( isset($field['after']) ) ? '<span> '.$field['after'].'</span>' : '';
|
540 |
-
$output = $before.'<input name="'.$field['id'].'" id="'.$field['id'].'" type="number" value="'.$value.'" class="small-text"'.$style.'>'.$after;
|
541 |
-
echo $output;
|
542 |
-
|
543 |
-
// Add appended fields
|
544 |
-
mtphr_dnt_metaboxer_append_field($field);
|
545 |
-
}
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
/**
|
550 |
-
* Renders a radio custom field.
|
551 |
-
*
|
552 |
-
* @since 1.0.0
|
553 |
-
*/
|
554 |
-
function mtphr_dnt_metaboxer_radio( $field, $value='' ) {
|
555 |
-
|
556 |
-
if( isset($field['options']) ) {
|
557 |
-
|
558 |
-
$output = '';
|
559 |
-
$break = '<br/>';
|
560 |
-
if ( isset($field['display']) ) {
|
561 |
-
if( $field['display'] == 'inline' ) {
|
562 |
-
$break = ' ';
|
563 |
-
}
|
564 |
-
}
|
565 |
-
foreach( $field['options'] as $i => $option ) {
|
566 |
-
$checked = ( $value == $i ) ? 'checked="checked"' : '';
|
567 |
-
$output .= '<label><input name="'.$field['id'].'" id="'.$field['id'].'" type="radio" value="'.$i.'" '.$checked.' /> '.$option.'</label>'.$break;
|
568 |
-
}
|
569 |
-
}
|
570 |
-
|
571 |
-
echo $output;
|
572 |
-
|
573 |
-
// Add appended fields
|
574 |
-
mtphr_dnt_metaboxer_append_field($field);
|
575 |
-
}
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
/**
|
580 |
-
* Renders a select field.
|
581 |
-
*
|
582 |
-
* @since 1.0.0
|
583 |
-
*/
|
584 |
-
function mtphr_dnt_metaboxer_select( $field, $value='' ) {
|
585 |
-
|
586 |
-
$before = ( isset($field['before']) ) ? '<span>'.$field['before'].' </span>' : '';
|
587 |
-
$after = ( isset($field['after']) ) ? '<span> '.$field['after'].'</span>' : '';
|
588 |
-
|
589 |
-
$output = $before.'<select name="'.$field['id'].'" id="'.$field['id'].'">';
|
590 |
-
|
591 |
-
if( $field['options'] ) {
|
592 |
-
|
593 |
-
$key_val = isset( $field['key_val'] ) ? true : false;
|
594 |
-
|
595 |
-
foreach ( $field['options'] as $key => $option ) {
|
596 |
-
if( is_numeric($key) && !$key_val ) {
|
597 |
-
$name = ( is_array( $option ) ) ? $option['name'] : $option;
|
598 |
-
$val = ( is_array( $option ) ) ? $option['value'] : $option;
|
599 |
-
} else {
|
600 |
-
$name = $option;
|
601 |
-
$val = $key;
|
602 |
-
}
|
603 |
-
$selected = ( $val == $value ) ? 'selected="selected"' : '';
|
604 |
-
$output .= '<option value="'.$val.'" '.$selected.'>'.stripslashes( $name ).'</option>';
|
605 |
-
}
|
606 |
-
}
|
607 |
-
$output .= '</select>'.$after;
|
608 |
-
|
609 |
-
echo $output;
|
610 |
-
|
611 |
-
// Add appended fields
|
612 |
-
mtphr_dnt_metaboxer_append_field($field);
|
613 |
-
}
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
/**
|
618 |
-
* Renders a sort.
|
619 |
-
*
|
620 |
-
* @since 1.0.0
|
621 |
-
*/
|
622 |
-
function mtphr_dnt_metaboxer_sort( $field, $value='' ) {
|
623 |
-
|
624 |
-
global $post;
|
625 |
-
|
626 |
-
$rows = array();
|
627 |
-
if( is_array($value) ) {
|
628 |
-
foreach( $value as $id ) {
|
629 |
-
if( isset($field['rows'][$id]) ) {
|
630 |
-
$rows[$id] = $field['rows'][$id];
|
631 |
-
}
|
632 |
-
}
|
633 |
-
} else {
|
634 |
-
$rows = $field['rows'];
|
635 |
-
}
|
636 |
-
|
637 |
-
foreach( $field['rows'] as $id=>$data ) {
|
638 |
-
if( !isset($rows[$id]) ) {
|
639 |
-
$rows[$id] = $data;
|
640 |
-
}
|
641 |
-
}
|
642 |
-
|
643 |
-
$output = '<table>';
|
644 |
-
|
645 |
-
foreach( $rows as $id => $data ) {
|
646 |
-
|
647 |
-
$output .= '<tr class="mtphr-dnt-metaboxer-sort-item"><td class="mtphr-dnt-metaboxer-sort-item-handle"><span></span></td>';
|
648 |
-
if( isset($data['name']) ) {
|
649 |
-
$output .= '<td class="mtphr-dnt-metaboxer-sort-name">'.$data['name'].'</td>';
|
650 |
-
}
|
651 |
-
$output .= '<td><input name="'.$field['id'].'[]" id="'.$field['id'].'[]" type="hidden" value="'.$id.'">';
|
652 |
-
|
653 |
-
// Find the value
|
654 |
-
$data_value = get_post_meta( $post->ID, $data['id'], true );
|
655 |
-
if( $data_value == '' && isset($data['default']) ) {
|
656 |
-
$data_value = $data['default'];
|
657 |
-
}
|
658 |
-
|
659 |
-
ob_start();
|
660 |
-
// Call the function to display the field
|
661 |
-
if ( function_exists('mtphr_dnt_metaboxer_'.$data['type']) ) {
|
662 |
-
call_user_func( 'mtphr_dnt_metaboxer_'.$data['type'], $data, $data_value );
|
663 |
-
}
|
664 |
-
$output .= ob_get_clean();
|
665 |
-
|
666 |
-
$output .= '</td>';
|
667 |
-
|
668 |
-
$output .= '</tr>';
|
669 |
-
}
|
670 |
-
|
671 |
-
$output .= '</table>';
|
672 |
-
|
673 |
-
echo $output;
|
674 |
-
|
675 |
-
// Add appended fields
|
676 |
-
mtphr_dnt_metaboxer_append_field($field);
|
677 |
-
}
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
/**
|
682 |
-
* Renders an text field.
|
683 |
-
*
|
684 |
-
* @since 1.0.1
|
685 |
-
*/
|
686 |
-
function mtphr_dnt_metaboxer_text( $field, $value='' ) {
|
687 |
-
$size = ( isset($field['size']) ) ? $field['size'] : 40;
|
688 |
-
$before = ( isset($field['before']) ) ? '<span>'.$field['before'].' </span>' : '';
|
689 |
-
$after = ( isset($field['after']) ) ? '<span> '.$field['after'].'</span>' : '';
|
690 |
-
$text_align = ( isset($field['text_align']) ) ? ' style="text-align:'.$field['text_align'].'"' : '' ;
|
691 |
-
$output = $before.'<input name="'.$field['id'].'" id="'.$field['id'].'" type="text" value="'.$value.'" size="'.$size.'"'.$text_align.'>'.$after;
|
692 |
-
echo $output;
|
693 |
-
|
694 |
-
// Add appended fields
|
695 |
-
mtphr_dnt_metaboxer_append_field($field);
|
696 |
-
}
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
/**
|
701 |
-
* Renders a textarea.
|
702 |
-
*
|
703 |
-
* @since 1.2.1
|
704 |
-
*/
|
705 |
-
function mtphr_dnt_metaboxer_textarea( $field, $value='' ) {
|
706 |
-
$rows = ( isset($field['rows']) ) ? $field['rows'] : 5;
|
707 |
-
$cols = ( isset($field['cols']) ) ? $field['cols'] : 40;
|
708 |
-
$output = '<textarea name="'.$field['id'].'" id="'.$field['id'].'" rows="'.$rows.'" cols="'.$cols.'">'.$value.'</textarea>';
|
709 |
-
echo $output;
|
710 |
-
|
711 |
-
// Add appended fields
|
712 |
-
mtphr_dnt_metaboxer_append_field($field);
|
713 |
-
}
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
/**
|
718 |
-
* Renders a wysiwyg field.
|
719 |
-
*
|
720 |
-
* @since 1.0.0
|
721 |
-
*/
|
722 |
-
function mtphr_dnt_metaboxer_wysiwyg( $field, $value='' ) {
|
723 |
-
$settings = array();
|
724 |
-
$settings['media_buttons'] = true;
|
725 |
-
$settings['textarea_rows'] = ( isset($field['rows']) ) ? $field['rows'] : 12;
|
726 |
-
wp_editor( $value, $field['id'], $settings );
|
727 |
-
|
728 |
-
// Add appended fields
|
729 |
-
mtphr_dnt_metaboxer_append_field($field);
|
730 |
-
}
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
/**
|
736 |
-
* Renders the code fields.
|
737 |
-
*
|
738 |
-
* @since 1.0.0
|
739 |
-
*/
|
740 |
-
function mtphr_dnt_metaboxer_code( $field, $value='' ) {
|
741 |
-
|
742 |
-
global $post;
|
743 |
-
|
744 |
-
// Display the shortcode code
|
745 |
-
if( $field['id'] == '_mtphr_dnt_shortcode' ) {
|
746 |
-
|
747 |
-
echo '<pre><p>[ditty_news_ticker id="'.$post->ID.'"]</p></pre>';
|
748 |
-
|
749 |
-
// Display the function code
|
750 |
-
} elseif( $field['id'] == '_mtphr_dnt_function' ) {
|
751 |
-
|
752 |
-
echo '<pre><p><?php if(function_exists(\'ditty_news_ticker\')){ditty_news_ticker('.$post->ID.');} ?></p></pre>';
|
753 |
-
}
|
754 |
-
|
755 |
-
// Display a "Select All" button
|
756 |
-
$button = isset($field['button']) ? $field['button'] : __('Select Code', 'ditty-news-ticker');
|
757 |
-
echo '<a href="#" class="button mtphr-dnt-metaboxer-code-select">'.$button.'</a>';
|
758 |
-
}
|
759 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/scripts.php
CHANGED
@@ -12,7 +12,7 @@ add_action( 'admin_enqueue_scripts', 'mtphr_dnt_admin_scripts' );
|
|
12 |
/**
|
13 |
* Load the metaboxer scripts
|
14 |
*
|
15 |
-
* @since 1.
|
16 |
*/
|
17 |
function mtphr_dnt_admin_scripts( $hook ) {
|
18 |
|
@@ -36,17 +36,8 @@ function mtphr_dnt_admin_scripts( $hook ) {
|
|
36 |
wp_enqueue_script( 'codemirror' );
|
37 |
wp_register_script( 'codemirror-css', MTPHR_DNT_URL.'/assets/js/css.js', array('jquery'), MTPHR_DNT_VERSION, true );
|
38 |
wp_enqueue_script( 'codemirror-css' );
|
39 |
-
|
40 |
-
// Load the metaboxer scripts
|
41 |
-
wp_register_style( 'ditty-metaboxer', MTPHR_DNT_URL.'/includes/metaboxer/metaboxer.css', array( 'colors', 'thickbox' ), MTPHR_DNT_VERSION );
|
42 |
-
wp_enqueue_style( 'ditty-metaboxer' );
|
43 |
-
wp_register_script( 'ditty-metaboxer', MTPHR_DNT_URL.'/includes/metaboxer/metaboxer.js', array( 'jquery','jquery-ui-core','jquery-ui-sortable' ), MTPHR_DNT_VERSION, true );
|
44 |
-
wp_enqueue_script( 'ditty-metaboxer' );
|
45 |
-
wp_localize_script( 'ditty-metaboxer', 'ditty_metaboxer_vars', array(
|
46 |
-
'security' => wp_create_nonce( 'ditty-metaboxer' )
|
47 |
-
)
|
48 |
-
);
|
49 |
|
|
|
50 |
wp_register_script( 'ditty-news-ticker', MTPHR_DNT_URL.'/assets/js/script-admin.js', array( 'jquery','jquery-ui-core','jquery-ui-sortable' ), MTPHR_DNT_VERSION, true );
|
51 |
wp_enqueue_script( 'ditty-news-ticker' );
|
52 |
wp_localize_script( 'ditty-news-ticker', 'ditty_news_ticker_vars', array(
|
12 |
/**
|
13 |
* Load the metaboxer scripts
|
14 |
*
|
15 |
+
* @since 1.4.5
|
16 |
*/
|
17 |
function mtphr_dnt_admin_scripts( $hook ) {
|
18 |
|
36 |
wp_enqueue_script( 'codemirror' );
|
37 |
wp_register_script( 'codemirror-css', MTPHR_DNT_URL.'/assets/js/css.js', array('jquery'), MTPHR_DNT_VERSION, true );
|
38 |
wp_enqueue_script( 'codemirror-css' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
+
// Load the news ticker scripts
|
41 |
wp_register_script( 'ditty-news-ticker', MTPHR_DNT_URL.'/assets/js/script-admin.js', array( 'jquery','jquery-ui-core','jquery-ui-sortable' ), MTPHR_DNT_VERSION, true );
|
42 |
wp_enqueue_script( 'ditty-news-ticker' );
|
43 |
wp_localize_script( 'ditty-news-ticker', 'ditty_news_ticker_vars', array(
|
includes/settings.php
CHANGED
@@ -79,7 +79,7 @@ function mtphr_dnt_settings_display( $active_tab = null ) {
|
|
79 |
|
80 |
|
81 |
/* --------------------------------------------------------- */
|
82 |
-
/* !Get the settings - 1.4.
|
83 |
/* --------------------------------------------------------- */
|
84 |
|
85 |
if( !function_exists('mtphr_dnt_general_settings') ) {
|
@@ -92,6 +92,7 @@ if( !function_exists('mtphr_dnt_general_settings_defaults') ) {
|
|
92 |
function mtphr_dnt_general_settings_defaults() {
|
93 |
$defaults = array(
|
94 |
'wysiwyg' => '',
|
|
|
95 |
'css' => ''
|
96 |
);
|
97 |
return $defaults;
|
@@ -122,7 +123,11 @@ function mtphr_dnt_initialize_settings() {
|
|
122 |
|
123 |
/* Visual Editor */
|
124 |
$title = mtphr_dnt_settings_label( __( 'Visual Editor', 'ditty-news-ticker' ), __('Use the visual editor to create tick contents', 'ditty-news-ticker') );
|
125 |
-
add_settings_field( 'mtphr_dnt_general_settings_wysiwyg', $title, 'mtphr_dnt_general_settings_wysiwyg', 'mtphr_dnt_general_settings', 'mtphr_dnt_general_settings_section', array('settings' => $settings) );
|
|
|
|
|
|
|
|
|
126 |
|
127 |
/* Custom CSS */
|
128 |
$title = mtphr_dnt_settings_label( __( 'Custom CSS', 'ditty-news-ticker' ), __('Add custom css to style your ticker without modifying any external files', 'ditty-news-ticker') );
|
@@ -157,6 +162,20 @@ function mtphr_dnt_general_settings_wysiwyg( $args ) {
|
|
157 |
}
|
158 |
}
|
159 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
/* --------------------------------------------------------- */
|
161 |
/* !CSS - 1.4.0 */
|
162 |
/* --------------------------------------------------------- */
|
@@ -187,58 +206,3 @@ function mtphr_dnt_general_settings_sanitize( $fields ) {
|
|
187 |
return $fields;
|
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 |
-
* The custom field callback.
|
213 |
-
*
|
214 |
-
* @since 1.2.1
|
215 |
-
*/
|
216 |
-
function mtphr_dnt_settings_callback( $args ) {
|
217 |
-
|
218 |
-
// First, we read the options collection
|
219 |
-
if( isset($args['option']) ) {
|
220 |
-
$options = get_option( $args['option'] );
|
221 |
-
$value = isset( $options[$args['option_id']] ) ? $options[$args['option_id']] : '';
|
222 |
-
} else {
|
223 |
-
$value = get_option( $args['id'] );
|
224 |
-
}
|
225 |
-
if( $value == '' && isset($args['default']) ) {
|
226 |
-
$value = $args['default'];
|
227 |
-
}
|
228 |
-
if( isset($args['type']) ) {
|
229 |
-
$class = ( isset($args['class']) ) ? $args['class'] : '';
|
230 |
-
echo '<div class="mtphr-dnt-metaboxer-field mtphr-dnt-metaboxer-'.$args['type'].' '.$class.'">';
|
231 |
-
|
232 |
-
// Call the function to display the field
|
233 |
-
if ( function_exists('mtphr_dnt_metaboxer_'.$args['type']) ) {
|
234 |
-
call_user_func( 'mtphr_dnt_metaboxer_'.$args['type'], $args, $value );
|
235 |
-
}
|
236 |
-
|
237 |
-
echo '</div>';
|
238 |
-
}
|
239 |
-
|
240 |
-
// Add a descriptions
|
241 |
-
if( isset($args['description']) ) {
|
242 |
-
echo '<span class="description"><small>'.$args['description'].'</small></span>';
|
243 |
-
}
|
244 |
-
}
|
79 |
|
80 |
|
81 |
/* --------------------------------------------------------- */
|
82 |
+
/* !Get the settings - 1.4.5 */
|
83 |
/* --------------------------------------------------------- */
|
84 |
|
85 |
if( !function_exists('mtphr_dnt_general_settings') ) {
|
92 |
function mtphr_dnt_general_settings_defaults() {
|
93 |
$defaults = array(
|
94 |
'wysiwyg' => '',
|
95 |
+
'edit_links' => '',
|
96 |
'css' => ''
|
97 |
);
|
98 |
return $defaults;
|
123 |
|
124 |
/* Visual Editor */
|
125 |
$title = mtphr_dnt_settings_label( __( 'Visual Editor', 'ditty-news-ticker' ), __('Use the visual editor to create tick contents', 'ditty-news-ticker') );
|
126 |
+
add_settings_field( 'mtphr_dnt_general_settings_wysiwyg', $title, 'mtphr_dnt_general_settings_wysiwyg', 'mtphr_dnt_general_settings', 'mtphr_dnt_general_settings_section', array('settings' => $settings) );
|
127 |
+
|
128 |
+
/* Quick Edit Links */
|
129 |
+
$title = mtphr_dnt_settings_label( __( 'Quick Edit Links', 'ditty-news-ticker' ), __('Add quick edit links on the front-end of the site for editors and admins', 'ditty-news-ticker') );
|
130 |
+
add_settings_field( 'mtphr_dnt_general_settings_edit_links', $title, 'mtphr_dnt_general_settings_edit_links', 'mtphr_dnt_general_settings', 'mtphr_dnt_general_settings_section', array('settings' => $settings) );
|
131 |
|
132 |
/* Custom CSS */
|
133 |
$title = mtphr_dnt_settings_label( __( 'Custom CSS', 'ditty-news-ticker' ), __('Add custom css to style your ticker without modifying any external files', 'ditty-news-ticker') );
|
162 |
}
|
163 |
}
|
164 |
|
165 |
+
/* --------------------------------------------------------- */
|
166 |
+
/* !Edit Links - 1.4.5 */
|
167 |
+
/* --------------------------------------------------------- */
|
168 |
+
|
169 |
+
if( !function_exists('mtphr_dnt_general_settings_edit_links') ) {
|
170 |
+
function mtphr_dnt_general_settings_edit_links( $args ) {
|
171 |
+
|
172 |
+
$settings = $args['settings'];
|
173 |
+
echo '<div id="mtphr_dnt_general_settings_edit_links">';
|
174 |
+
echo '<label><input type="checkbox" name="mtphr_dnt_general_settings[edit_links]" value="1" '.checked('1', $settings['edit_links'], false).' /> '.__('Add quick edit links', 'ditty-news-ticker').'</label>';
|
175 |
+
echo '</div>';
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
/* --------------------------------------------------------- */
|
180 |
/* !CSS - 1.4.0 */
|
181 |
/* --------------------------------------------------------- */
|
206 |
return $fields;
|
207 |
}
|
208 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/ditty-news-ticker-en_US.mo
CHANGED
Binary file
|
languages/ditty-news-ticker-en_US.po
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
-
"Project-Id-Version: Ditty News Ticker v1.4.
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2014-
|
7 |
"Last-Translator: admin <joe@metaphorcreations.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
@@ -20,494 +20,489 @@ msgstr ""
|
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
"X-Textdomain-Support: yes"
|
22 |
|
23 |
-
#: includes/edit-columns.php:
|
24 |
#@ ditty-news-ticker
|
25 |
msgid "Type"
|
26 |
-
msgstr "
|
27 |
|
28 |
-
#: includes/edit-columns.php:
|
29 |
#@ ditty-news-ticker
|
30 |
msgid "Mode"
|
31 |
-
msgstr "
|
32 |
|
33 |
-
#: includes/edit-columns.php:
|
34 |
#: includes/meta-boxes.php:18
|
35 |
#@ ditty-news-ticker
|
36 |
msgid "Shortcode"
|
37 |
-
msgstr "
|
38 |
|
39 |
-
#: includes/edit-columns.php:
|
40 |
#: includes/meta-boxes.php:27
|
41 |
#@ ditty-news-ticker
|
42 |
msgid "Direct Function"
|
43 |
-
msgstr "
|
44 |
|
45 |
#: includes/helpers.php:13
|
46 |
#@ ditty-news-ticker
|
47 |
msgid "Default"
|
48 |
-
msgstr "
|
49 |
|
50 |
#: includes/helpers.php:37
|
51 |
#@ ditty-news-ticker
|
52 |
msgid "Scroll"
|
53 |
-
msgstr "
|
54 |
|
55 |
#: includes/helpers.php:41
|
56 |
#@ ditty-news-ticker
|
57 |
msgid "Rotate"
|
58 |
-
msgstr "
|
59 |
|
60 |
#: includes/helpers.php:45
|
61 |
#@ ditty-news-ticker
|
62 |
msgid "List"
|
63 |
-
msgstr "
|
64 |
|
65 |
#: includes/help.php:59
|
66 |
#@ ditty-news-ticker
|
67 |
msgid "Scroll Mode"
|
68 |
-
msgstr "
|
69 |
|
70 |
#: includes/help.php:66
|
71 |
#@ ditty-news-ticker
|
72 |
msgid "Rotate Mode"
|
73 |
-
msgstr "
|
74 |
|
75 |
#: includes/help.php:73
|
76 |
#@ ditty-news-ticker
|
77 |
msgid "List Mode"
|
78 |
-
msgstr "
|
79 |
|
80 |
#: includes/help.php:95
|
81 |
#: includes/widget.php:51
|
82 |
#@ ditty-news-ticker
|
83 |
msgid "Ditty News Ticker"
|
84 |
-
msgstr "
|
85 |
|
86 |
#: includes/help.php:110
|
87 |
#@ ditty-news-ticker
|
88 |
msgid "For more information:"
|
89 |
-
msgstr "
|
90 |
|
91 |
#: includes/help.php:111
|
92 |
#@ ditty-news-ticker
|
93 |
msgid "Visit the <a href=\"http://www.metaphorcreations.com\" target=\"_blank\">documentation</a> on the Ditty News Ticker website"
|
94 |
-
msgstr "
|
95 |
|
96 |
#: includes/help.php:126
|
97 |
#@ ditty-news-ticker
|
98 |
msgid "Add general information about Ditty News Ticker."
|
99 |
-
msgstr "
|
100 |
|
101 |
#: includes/help.php:135
|
102 |
#@ ditty-news-ticker
|
103 |
msgid "Add scroll mode info."
|
104 |
-
msgstr "
|
105 |
|
106 |
#: includes/help.php:144
|
107 |
#@ ditty-news-ticker
|
108 |
msgid "Add rotate mode info."
|
109 |
-
msgstr "
|
110 |
|
111 |
#: includes/help.php:153
|
112 |
#@ ditty-news-ticker
|
113 |
msgid "Add list mode info."
|
114 |
-
msgstr "
|
115 |
|
116 |
#: includes/meta-boxes.php:65
|
117 |
#@ ditty-news-ticker
|
118 |
msgid "Ticker Type"
|
119 |
-
msgstr "
|
120 |
|
121 |
#: includes/meta-boxes.php:65
|
122 |
#@ ditty-news-ticker
|
123 |
msgid "View all types"
|
124 |
-
msgstr "
|
125 |
|
126 |
-
#: includes/meta-boxes.php:
|
127 |
#@ ditty-news-ticker
|
128 |
msgid "Ticker text"
|
129 |
-
msgstr "
|
130 |
|
131 |
-
#: includes/meta-boxes.php:
|
132 |
#@ ditty-news-ticker
|
133 |
msgid "Link"
|
134 |
-
msgstr "
|
135 |
|
136 |
-
#: includes/meta-boxes.php:
|
137 |
#@ ditty-news-ticker
|
138 |
msgid "Target"
|
139 |
-
msgstr "
|
140 |
|
141 |
#: includes/meta-boxes.php:120
|
142 |
#@ ditty-news-ticker
|
143 |
msgid "Default Ticker Items"
|
144 |
-
msgstr "
|
145 |
|
146 |
#: includes/meta-boxes.php:86
|
147 |
#@ ditty-news-ticker
|
148 |
msgid "Ticker Mode"
|
149 |
-
msgstr "
|
150 |
|
151 |
-
#: includes/meta-boxes.php:
|
152 |
#@ ditty-news-ticker
|
153 |
msgid "Scroll direction"
|
154 |
-
msgstr "
|
155 |
|
156 |
-
#: includes/meta-boxes.php:
|
157 |
#@ ditty-news-ticker
|
158 |
msgid "Left"
|
159 |
-
msgstr "
|
160 |
|
161 |
-
#: includes/meta-boxes.php:
|
162 |
#@ ditty-news-ticker
|
163 |
msgid "Right"
|
164 |
-
msgstr "
|
165 |
|
166 |
-
#: includes/meta-boxes.php:
|
167 |
#@ ditty-news-ticker
|
168 |
msgid "Up"
|
169 |
-
msgstr "
|
170 |
|
171 |
-
#: includes/meta-boxes.php:
|
172 |
#@ ditty-news-ticker
|
173 |
msgid "Down"
|
174 |
-
msgstr "
|
175 |
|
176 |
-
#: includes/meta-boxes.php:
|
177 |
-
#: includes/meta-boxes.php:
|
178 |
#@ ditty-news-ticker
|
179 |
msgid "Tick dimensions"
|
180 |
-
msgstr "
|
181 |
|
182 |
-
#: includes/meta-boxes.php:
|
183 |
#@ ditty-news-ticker
|
184 |
msgid "Width"
|
185 |
-
msgstr "
|
186 |
|
187 |
-
#: includes/meta-boxes.php:
|
188 |
-
#: includes/meta-boxes.php:
|
189 |
#@ ditty-news-ticker
|
190 |
msgid "Height"
|
191 |
-
msgstr "
|
192 |
|
193 |
-
#: includes/meta-boxes.php:
|
194 |
#@ ditty-news-ticker
|
195 |
msgid "Scroller padding"
|
196 |
-
msgstr "
|
197 |
|
198 |
-
#: includes/meta-boxes.php:
|
199 |
-
#: includes/meta-boxes.php:
|
200 |
-
#: includes/meta-boxes.php:
|
201 |
#@ ditty-news-ticker
|
202 |
msgid "Vertical padding"
|
203 |
-
msgstr "
|
204 |
|
205 |
-
#: includes/meta-boxes.php:
|
206 |
-
#: includes/meta-boxes.php:
|
207 |
-
#: includes/meta-boxes.php:
|
208 |
#@ ditty-news-ticker
|
209 |
msgid "Vertical margin"
|
210 |
-
msgstr "
|
211 |
|
212 |
-
#: includes/meta-boxes.php:
|
213 |
#@ ditty-news-ticker
|
214 |
msgid "Scroll speed"
|
215 |
-
msgstr "
|
216 |
|
217 |
-
#: includes/meta-boxes.php:
|
218 |
-
#: includes/meta-boxes.php:
|
219 |
#@ ditty-news-ticker
|
220 |
msgid "Pause on mouse over"
|
221 |
-
msgstr "
|
222 |
|
223 |
-
#: includes/meta-boxes.php:
|
224 |
-
#: includes/meta-boxes.php:
|
225 |
#@ ditty-news-ticker
|
226 |
msgid "Tick spacing"
|
227 |
-
msgstr "
|
228 |
|
229 |
-
#: includes/meta-boxes.php:
|
230 |
-
#: includes/meta-boxes.php:
|
231 |
#@ ditty-news-ticker
|
232 |
msgid "Pixels"
|
233 |
-
msgstr "
|
234 |
|
235 |
#: includes/meta-boxes.php:142
|
236 |
#@ ditty-news-ticker
|
237 |
msgid "Scroll Settings"
|
238 |
-
msgstr "
|
239 |
|
240 |
-
#: includes/meta-boxes.php:
|
241 |
#@ ditty-news-ticker
|
242 |
msgid "Rotation type"
|
243 |
-
msgstr "
|
244 |
|
245 |
-
#: includes/meta-boxes.php:
|
246 |
#@ ditty-news-ticker
|
247 |
msgid "Fade"
|
248 |
-
msgstr "
|
249 |
|
250 |
-
#: includes/meta-boxes.php:
|
251 |
#@ ditty-news-ticker
|
252 |
msgid "Slide left"
|
253 |
-
msgstr "
|
254 |
|
255 |
-
#: includes/meta-boxes.php:
|
256 |
#@ ditty-news-ticker
|
257 |
msgid "Slide right"
|
258 |
-
msgstr "
|
259 |
|
260 |
-
#: includes/meta-boxes.php:
|
261 |
#@ ditty-news-ticker
|
262 |
msgid "Slide up"
|
263 |
-
msgstr "
|
264 |
|
265 |
-
#: includes/meta-boxes.php:
|
266 |
#@ ditty-news-ticker
|
267 |
msgid "Slide down"
|
268 |
-
msgstr "
|
269 |
|
270 |
-
#: includes/meta-boxes.php:
|
271 |
#@ ditty-news-ticker
|
272 |
msgid "Dynamic slide direction"
|
273 |
-
msgstr "
|
274 |
|
275 |
-
#: includes/meta-boxes.php:
|
276 |
#@ ditty-news-ticker
|
277 |
msgid "Rotator padding"
|
278 |
-
msgstr "
|
279 |
|
280 |
-
#: includes/meta-boxes.php:
|
281 |
#@ ditty-news-ticker
|
282 |
msgid "Auto rotate"
|
283 |
-
msgstr "
|
284 |
|
285 |
-
#: includes/meta-boxes.php:
|
286 |
-
#: includes/meta-boxes.php:
|
287 |
-
#: includes/meta-boxes.php:
|
288 |
-
#: includes/meta-boxes.php:
|
289 |
#@ ditty-news-ticker
|
290 |
msgid "Enable"
|
291 |
-
msgstr "
|
292 |
|
293 |
-
#: includes/meta-boxes.php:
|
294 |
#@ ditty-news-ticker
|
295 |
msgid "Seconds delay"
|
296 |
-
msgstr "
|
297 |
|
298 |
-
#: includes/meta-boxes.php:
|
299 |
#@ ditty-news-ticker
|
300 |
msgid "Rotate speed"
|
301 |
-
msgstr "
|
302 |
|
303 |
-
#: includes/meta-boxes.php:
|
304 |
#@ ditty-news-ticker
|
305 |
msgid "Tenths of a second"
|
306 |
-
msgstr "
|
307 |
|
308 |
-
#: includes/meta-boxes.php:
|
309 |
#@ ditty-news-ticker
|
310 |
msgid "Directional navigation"
|
311 |
-
msgstr "
|
312 |
|
313 |
-
#: includes/meta-boxes.php:
|
314 |
#@ ditty-news-ticker
|
315 |
msgid "Autohide navigation"
|
316 |
-
msgstr "
|
317 |
|
318 |
-
#: includes/meta-boxes.php:
|
319 |
#@ ditty-news-ticker
|
320 |
msgid "Control navigation"
|
321 |
-
msgstr "
|
322 |
|
323 |
-
#: includes/meta-boxes.php:
|
324 |
#@ ditty-news-ticker
|
325 |
msgid "Numbers"
|
326 |
-
msgstr "
|
327 |
|
328 |
-
#: includes/meta-boxes.php:
|
329 |
#@ ditty-news-ticker
|
330 |
msgid "Buttons"
|
331 |
-
msgstr "
|
332 |
|
333 |
#: includes/meta-boxes.php:153
|
334 |
#@ ditty-news-ticker
|
335 |
msgid "Rotate Settings"
|
336 |
-
msgstr "
|
337 |
|
338 |
-
#: includes/meta-boxes.php:
|
339 |
#@ ditty-news-ticker
|
340 |
msgid "List padding"
|
341 |
-
msgstr "
|
342 |
|
343 |
#: includes/meta-boxes.php:164
|
344 |
#@ ditty-news-ticker
|
345 |
msgid "List Settings"
|
346 |
-
msgstr "
|
347 |
|
348 |
-
#: includes/meta-boxes.php:
|
349 |
#@ ditty-news-ticker
|
350 |
msgid "Display title"
|
351 |
-
msgstr "
|
352 |
|
353 |
-
#: includes/meta-boxes.php:
|
354 |
#@ ditty-news-ticker
|
355 |
msgid "Inline title"
|
356 |
-
msgstr "
|
357 |
|
358 |
-
#: includes/meta-boxes.php:
|
359 |
#@ ditty-news-ticker
|
360 |
msgid "Ticker width <em>(optional)</em>"
|
361 |
-
msgstr "
|
362 |
|
363 |
#: includes/meta-boxes.php:175
|
364 |
#@ ditty-news-ticker
|
365 |
msgid "Global Settings"
|
366 |
-
msgstr "
|
367 |
|
368 |
#: includes/meta-boxes.php:21
|
369 |
#@ ditty-news-ticker
|
370 |
msgid "Select Shortcode"
|
371 |
-
msgstr "
|
372 |
|
373 |
#: includes/meta-boxes.php:31
|
374 |
#@ ditty-news-ticker
|
375 |
msgid "Select Function"
|
376 |
-
msgstr "
|
377 |
-
|
378 |
-
#: includes/metaboxer/metaboxer.php:756
|
379 |
-
#@ ditty-news-ticker
|
380 |
-
msgid "Select Code"
|
381 |
-
msgstr "Select Code"
|
382 |
|
383 |
#: includes/post-types.php:20
|
384 |
#: includes/post-types.php:31
|
385 |
#@ ditty-news-ticker
|
386 |
msgid "News Tickers"
|
387 |
-
msgstr "
|
388 |
|
389 |
#: includes/post-types.php:21
|
390 |
#@ ditty-news-ticker
|
391 |
msgid "News Ticker"
|
392 |
-
msgstr "
|
393 |
|
394 |
#: includes/post-types.php:22
|
395 |
#@ ditty-news-ticker
|
396 |
msgid "Add New"
|
397 |
-
msgstr "
|
398 |
|
399 |
#: includes/post-types.php:23
|
400 |
#@ ditty-news-ticker
|
401 |
msgid "Add New News Ticker"
|
402 |
-
msgstr "
|
403 |
|
404 |
#: includes/post-types.php:24
|
405 |
#@ ditty-news-ticker
|
406 |
msgid "Edit News Ticker"
|
407 |
-
msgstr "
|
408 |
|
409 |
#: includes/post-types.php:25
|
410 |
#@ ditty-news-ticker
|
411 |
msgid "New News Ticker"
|
412 |
-
msgstr "
|
413 |
|
414 |
#: includes/post-types.php:26
|
415 |
#@ ditty-news-ticker
|
416 |
msgid "View News Ticker"
|
417 |
-
msgstr "
|
418 |
|
419 |
#: includes/post-types.php:27
|
420 |
#@ ditty-news-ticker
|
421 |
msgid "Search News Tickers"
|
422 |
-
msgstr "
|
423 |
|
424 |
#: includes/post-types.php:28
|
425 |
#@ ditty-news-ticker
|
426 |
msgid "No News Tickers Found"
|
427 |
-
msgstr "
|
428 |
|
429 |
#: includes/post-types.php:29
|
430 |
#@ ditty-news-ticker
|
431 |
msgid "No News Tickers Found In Trash"
|
432 |
-
msgstr "
|
433 |
|
434 |
-
#: includes/post-types.php:
|
435 |
#@ ditty-news-ticker
|
436 |
msgid "Ditty News Ticker Updated!"
|
437 |
-
msgstr "
|
438 |
|
439 |
#: includes/settings.php:11
|
440 |
#: includes/settings.php:12
|
441 |
#@ ditty-news-ticker
|
442 |
msgid "Settings"
|
443 |
-
msgstr "
|
444 |
|
445 |
#: includes/settings.php:128
|
446 |
#@ ditty-news-ticker
|
447 |
msgid "Custom CSS"
|
448 |
-
msgstr "
|
449 |
|
450 |
#: includes/settings.php:44
|
451 |
#@ ditty-news-ticker
|
452 |
msgid "Ditty News Ticker Settings"
|
453 |
-
msgstr "
|
454 |
|
455 |
#: includes/widget.php:42
|
456 |
#@ ditty-news-ticker
|
457 |
msgid "Displays a Ditty News Ticker."
|
458 |
-
msgstr "
|
459 |
|
460 |
#: includes/widget.php:137
|
461 |
#@ ditty-news-ticker
|
462 |
msgid "Title:"
|
463 |
-
msgstr "
|
464 |
|
465 |
#: includes/widget.php:143
|
466 |
#@ ditty-news-ticker
|
467 |
msgid "Select a Ticker:"
|
468 |
-
msgstr "
|
469 |
|
470 |
#: includes/widget.php:161
|
471 |
#@ ditty-news-ticker
|
472 |
msgid "Display Ticker Title?"
|
473 |
-
msgstr "
|
474 |
|
475 |
#: includes/help.php:112
|
476 |
#@ ditty-news-ticker
|
477 |
msgid "View DNT extensions"
|
478 |
-
msgstr "
|
479 |
|
480 |
-
#: includes/meta-boxes.php:
|
481 |
#@ ditty-news-ticker
|
482 |
msgid "NF"
|
483 |
-
msgstr "
|
484 |
|
485 |
#: includes/settings.php:28
|
486 |
#@ ditty-news-ticker
|
487 |
msgid "The global settings to your news tickers."
|
488 |
-
msgstr "
|
489 |
|
490 |
-
#: includes/meta-boxes.php:
|
491 |
#@ ditty-news-ticker
|
492 |
msgid "Show first tick on init"
|
493 |
msgstr ""
|
494 |
|
495 |
-
#: includes/meta-boxes.php:
|
496 |
#@ ditty-news-ticker
|
497 |
msgid "Randomly shuffle the ticks"
|
498 |
msgstr ""
|
499 |
|
500 |
-
#: includes/meta-boxes.php:
|
501 |
#@ ditty-news-ticker
|
502 |
msgid "Offset ticks"
|
503 |
msgstr ""
|
504 |
|
505 |
-
#: includes/meta-boxes.php:
|
506 |
#@ ditty-news-ticker
|
507 |
msgid "px from the edge"
|
508 |
msgstr ""
|
509 |
|
510 |
-
#: includes/meta-boxes.php:
|
511 |
#@ ditty-news-ticker
|
512 |
msgid "The amount of pixels ticks should start and end off the screen."
|
513 |
msgstr ""
|
@@ -537,32 +532,27 @@ msgstr ""
|
|
537 |
msgid "Mixed Ticker Items"
|
538 |
msgstr ""
|
539 |
|
540 |
-
#: includes/meta-boxes.php:
|
541 |
-
#@ ditty-news-ticker
|
542 |
-
msgid "Add Tick"
|
543 |
-
msgstr ""
|
544 |
-
|
545 |
-
#: includes/meta-boxes.php:307
|
546 |
#@ ditty-news-ticker
|
547 |
msgid "Tick selection"
|
548 |
msgstr ""
|
549 |
|
550 |
-
#: includes/meta-boxes.php:
|
551 |
#@ ditty-news-ticker
|
552 |
msgid "Select the ticks you would like to display by choosing the tick type and the offset position of the selected feed"
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: includes/meta-boxes.php:
|
556 |
#@ ditty-news-ticker
|
557 |
msgid "Type:"
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: includes/meta-boxes.php:
|
561 |
#@ ditty-news-ticker
|
562 |
msgid "Select Tick Type"
|
563 |
msgstr ""
|
564 |
|
565 |
-
#: includes/meta-boxes.php:
|
566 |
#@ ditty-news-ticker
|
567 |
msgid "Offset:"
|
568 |
msgstr ""
|
@@ -607,145 +597,145 @@ msgstr ""
|
|
607 |
msgid "Add an unlimited number of ticks to your ticker"
|
608 |
msgstr ""
|
609 |
|
610 |
-
#: includes/meta-boxes.php:
|
611 |
#@ ditty-news-ticker
|
612 |
msgid "Set the scroll direction of the ticker"
|
613 |
msgstr ""
|
614 |
|
615 |
-
#: includes/meta-boxes.php:
|
616 |
-
#: includes/meta-boxes.php:
|
617 |
#@ ditty-news-ticker
|
618 |
msgid "Override the auto dimensions with specific values"
|
619 |
msgstr ""
|
620 |
|
621 |
-
#: includes/meta-boxes.php:
|
622 |
#@ ditty-news-ticker
|
623 |
msgid "Set the vertical spacing of the scrolling data"
|
624 |
msgstr ""
|
625 |
|
626 |
-
#: includes/meta-boxes.php:
|
627 |
#@ ditty-news-ticker
|
628 |
msgid "Set the speed of the scrolling data"
|
629 |
msgstr ""
|
630 |
|
631 |
-
#: includes/meta-boxes.php:
|
632 |
#@ ditty-news-ticker
|
633 |
msgid "Set the spacing between scrolling data"
|
634 |
msgstr ""
|
635 |
|
636 |
-
#: includes/meta-boxes.php:
|
637 |
#@ ditty-news-ticker
|
638 |
msgid "Set the type of rotation for the ticker"
|
639 |
msgstr ""
|
640 |
|
641 |
-
#: includes/meta-boxes.php:
|
642 |
#@ ditty-news-ticker
|
643 |
msgid "Set the vertical spacing of the rotating data"
|
644 |
msgstr ""
|
645 |
|
646 |
-
#: includes/meta-boxes.php:
|
647 |
#@ ditty-news-ticker
|
648 |
msgid "Set the delay between rotations"
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: includes/meta-boxes.php:
|
652 |
#@ ditty-news-ticker
|
653 |
msgid "Set the speed & easing of the rotation"
|
654 |
msgstr ""
|
655 |
|
656 |
-
#: includes/meta-boxes.php:
|
657 |
#@ ditty-news-ticker
|
658 |
msgid "Set the directional navigation options"
|
659 |
msgstr ""
|
660 |
|
661 |
-
#: includes/meta-boxes.php:
|
662 |
#@ ditty-news-ticker
|
663 |
msgid "Set the control navigation options"
|
664 |
msgstr ""
|
665 |
|
666 |
-
#: includes/meta-boxes.php:
|
667 |
-
#: includes/meta-boxes.php:
|
668 |
#@ ditty-news-ticker
|
669 |
msgid "« Previous"
|
670 |
msgstr ""
|
671 |
|
672 |
-
#: includes/meta-boxes.php:
|
673 |
-
#: includes/meta-boxes.php:
|
674 |
#@ ditty-news-ticker
|
675 |
msgid "Next »"
|
676 |
msgstr ""
|
677 |
|
678 |
-
#: includes/meta-boxes.php:
|
679 |
#@ ditty-news-ticker
|
680 |
msgid "Set the vertical spacing of the list container"
|
681 |
msgstr ""
|
682 |
|
683 |
-
#: includes/meta-boxes.php:
|
684 |
#@ ditty-news-ticker
|
685 |
msgid "Set the spacing between ticks"
|
686 |
msgstr ""
|
687 |
|
688 |
-
#: includes/meta-boxes.php:
|
689 |
#@ ditty-news-ticker
|
690 |
msgid "List paging"
|
691 |
msgstr ""
|
692 |
|
693 |
-
#: includes/meta-boxes.php:
|
694 |
#@ ditty-news-ticker
|
695 |
msgid "Break the list up into pages"
|
696 |
msgstr ""
|
697 |
|
698 |
-
#: includes/meta-boxes.php:
|
699 |
#@ ditty-news-ticker
|
700 |
msgid "Ticks per page"
|
701 |
msgstr ""
|
702 |
|
703 |
-
#: includes/meta-boxes.php:
|
704 |
#@ ditty-news-ticker
|
705 |
msgid "Enable previous & next links"
|
706 |
msgstr ""
|
707 |
|
708 |
-
#: includes/meta-boxes.php:
|
709 |
#@ ditty-news-ticker
|
710 |
msgid "Previous text"
|
711 |
msgstr ""
|
712 |
|
713 |
-
#: includes/meta-boxes.php:
|
714 |
#@ ditty-news-ticker
|
715 |
msgid "Next text"
|
716 |
msgstr ""
|
717 |
|
718 |
-
#: includes/meta-boxes.php:
|
719 |
#@ ditty-news-ticker
|
720 |
msgid "Grid Display"
|
721 |
msgstr ""
|
722 |
|
723 |
-
#: includes/meta-boxes.php:
|
724 |
#@ ditty-news-ticker
|
725 |
msgid "Display ticks in a grid"
|
726 |
msgstr ""
|
727 |
|
728 |
-
#: includes/meta-boxes.php:
|
729 |
#@ ditty-news-ticker
|
730 |
msgid "Render empty rows"
|
731 |
msgstr ""
|
732 |
|
733 |
-
#: includes/meta-boxes.php:
|
734 |
#@ ditty-news-ticker
|
735 |
msgid "Force equal column width"
|
736 |
msgstr ""
|
737 |
|
738 |
-
#: includes/meta-boxes.php:
|
739 |
#@ ditty-news-ticker
|
740 |
msgid "Columns"
|
741 |
msgstr ""
|
742 |
|
743 |
-
#: includes/meta-boxes.php:
|
744 |
#@ ditty-news-ticker
|
745 |
msgid "Rows"
|
746 |
msgstr ""
|
747 |
|
748 |
-
#: includes/meta-boxes.php:
|
749 |
#@ ditty-news-ticker
|
750 |
msgid "Cell padding"
|
751 |
msgstr ""
|
@@ -775,3 +765,28 @@ msgstr ""
|
|
775 |
msgid "The content in the visual editors will disappear after re-arranging ticks. That content will re-populate after re-saving the ticker."
|
776 |
msgstr ""
|
777 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
+
"Project-Id-Version: Ditty News Ticker v1.4.5\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2014-04-01 16:12:16+0000\n"
|
7 |
"Last-Translator: admin <joe@metaphorcreations.com>\n"
|
8 |
"Language-Team: \n"
|
9 |
"MIME-Version: 1.0\n"
|
20 |
"X-Poedit-SearchPath-0: .\n"
|
21 |
"X-Textdomain-Support: yes"
|
22 |
|
23 |
+
#: includes/edit-columns.php:13
|
24 |
#@ ditty-news-ticker
|
25 |
msgid "Type"
|
26 |
+
msgstr ""
|
27 |
|
28 |
+
#: includes/edit-columns.php:14
|
29 |
#@ ditty-news-ticker
|
30 |
msgid "Mode"
|
31 |
+
msgstr ""
|
32 |
|
33 |
+
#: includes/edit-columns.php:15
|
34 |
#: includes/meta-boxes.php:18
|
35 |
#@ ditty-news-ticker
|
36 |
msgid "Shortcode"
|
37 |
+
msgstr ""
|
38 |
|
39 |
+
#: includes/edit-columns.php:16
|
40 |
#: includes/meta-boxes.php:27
|
41 |
#@ ditty-news-ticker
|
42 |
msgid "Direct Function"
|
43 |
+
msgstr ""
|
44 |
|
45 |
#: includes/helpers.php:13
|
46 |
#@ ditty-news-ticker
|
47 |
msgid "Default"
|
48 |
+
msgstr ""
|
49 |
|
50 |
#: includes/helpers.php:37
|
51 |
#@ ditty-news-ticker
|
52 |
msgid "Scroll"
|
53 |
+
msgstr ""
|
54 |
|
55 |
#: includes/helpers.php:41
|
56 |
#@ ditty-news-ticker
|
57 |
msgid "Rotate"
|
58 |
+
msgstr ""
|
59 |
|
60 |
#: includes/helpers.php:45
|
61 |
#@ ditty-news-ticker
|
62 |
msgid "List"
|
63 |
+
msgstr ""
|
64 |
|
65 |
#: includes/help.php:59
|
66 |
#@ ditty-news-ticker
|
67 |
msgid "Scroll Mode"
|
68 |
+
msgstr ""
|
69 |
|
70 |
#: includes/help.php:66
|
71 |
#@ ditty-news-ticker
|
72 |
msgid "Rotate Mode"
|
73 |
+
msgstr ""
|
74 |
|
75 |
#: includes/help.php:73
|
76 |
#@ ditty-news-ticker
|
77 |
msgid "List Mode"
|
78 |
+
msgstr ""
|
79 |
|
80 |
#: includes/help.php:95
|
81 |
#: includes/widget.php:51
|
82 |
#@ ditty-news-ticker
|
83 |
msgid "Ditty News Ticker"
|
84 |
+
msgstr ""
|
85 |
|
86 |
#: includes/help.php:110
|
87 |
#@ ditty-news-ticker
|
88 |
msgid "For more information:"
|
89 |
+
msgstr ""
|
90 |
|
91 |
#: includes/help.php:111
|
92 |
#@ ditty-news-ticker
|
93 |
msgid "Visit the <a href=\"http://www.metaphorcreations.com\" target=\"_blank\">documentation</a> on the Ditty News Ticker website"
|
94 |
+
msgstr ""
|
95 |
|
96 |
#: includes/help.php:126
|
97 |
#@ ditty-news-ticker
|
98 |
msgid "Add general information about Ditty News Ticker."
|
99 |
+
msgstr ""
|
100 |
|
101 |
#: includes/help.php:135
|
102 |
#@ ditty-news-ticker
|
103 |
msgid "Add scroll mode info."
|
104 |
+
msgstr ""
|
105 |
|
106 |
#: includes/help.php:144
|
107 |
#@ ditty-news-ticker
|
108 |
msgid "Add rotate mode info."
|
109 |
+
msgstr ""
|
110 |
|
111 |
#: includes/help.php:153
|
112 |
#@ ditty-news-ticker
|
113 |
msgid "Add list mode info."
|
114 |
+
msgstr ""
|
115 |
|
116 |
#: includes/meta-boxes.php:65
|
117 |
#@ ditty-news-ticker
|
118 |
msgid "Ticker Type"
|
119 |
+
msgstr ""
|
120 |
|
121 |
#: includes/meta-boxes.php:65
|
122 |
#@ ditty-news-ticker
|
123 |
msgid "View all types"
|
124 |
+
msgstr ""
|
125 |
|
126 |
+
#: includes/meta-boxes.php:222
|
127 |
#@ ditty-news-ticker
|
128 |
msgid "Ticker text"
|
129 |
+
msgstr ""
|
130 |
|
131 |
+
#: includes/meta-boxes.php:227
|
132 |
#@ ditty-news-ticker
|
133 |
msgid "Link"
|
134 |
+
msgstr ""
|
135 |
|
136 |
+
#: includes/meta-boxes.php:228
|
137 |
#@ ditty-news-ticker
|
138 |
msgid "Target"
|
139 |
+
msgstr ""
|
140 |
|
141 |
#: includes/meta-boxes.php:120
|
142 |
#@ ditty-news-ticker
|
143 |
msgid "Default Ticker Items"
|
144 |
+
msgstr ""
|
145 |
|
146 |
#: includes/meta-boxes.php:86
|
147 |
#@ ditty-news-ticker
|
148 |
msgid "Ticker Mode"
|
149 |
+
msgstr ""
|
150 |
|
151 |
+
#: includes/meta-boxes.php:405
|
152 |
#@ ditty-news-ticker
|
153 |
msgid "Scroll direction"
|
154 |
+
msgstr ""
|
155 |
|
156 |
+
#: includes/meta-boxes.php:409
|
157 |
#@ ditty-news-ticker
|
158 |
msgid "Left"
|
159 |
+
msgstr ""
|
160 |
|
161 |
+
#: includes/meta-boxes.php:410
|
162 |
#@ ditty-news-ticker
|
163 |
msgid "Right"
|
164 |
+
msgstr ""
|
165 |
|
166 |
+
#: includes/meta-boxes.php:411
|
167 |
#@ ditty-news-ticker
|
168 |
msgid "Up"
|
169 |
+
msgstr ""
|
170 |
|
171 |
+
#: includes/meta-boxes.php:412
|
172 |
#@ ditty-news-ticker
|
173 |
msgid "Down"
|
174 |
+
msgstr ""
|
175 |
|
176 |
+
#: includes/meta-boxes.php:419
|
177 |
+
#: includes/meta-boxes.php:536
|
178 |
#@ ditty-news-ticker
|
179 |
msgid "Tick dimensions"
|
180 |
+
msgstr ""
|
181 |
|
182 |
+
#: includes/meta-boxes.php:423
|
183 |
#@ ditty-news-ticker
|
184 |
msgid "Width"
|
185 |
+
msgstr ""
|
186 |
|
187 |
+
#: includes/meta-boxes.php:424
|
188 |
+
#: includes/meta-boxes.php:540
|
189 |
#@ ditty-news-ticker
|
190 |
msgid "Height"
|
191 |
+
msgstr ""
|
192 |
|
193 |
+
#: includes/meta-boxes.php:430
|
194 |
#@ ditty-news-ticker
|
195 |
msgid "Scroller padding"
|
196 |
+
msgstr ""
|
197 |
|
198 |
+
#: includes/meta-boxes.php:434
|
199 |
+
#: includes/meta-boxes.php:550
|
200 |
+
#: includes/meta-boxes.php:659
|
201 |
#@ ditty-news-ticker
|
202 |
msgid "Vertical padding"
|
203 |
+
msgstr ""
|
204 |
|
205 |
+
#: includes/meta-boxes.php:435
|
206 |
+
#: includes/meta-boxes.php:551
|
207 |
+
#: includes/meta-boxes.php:660
|
208 |
#@ ditty-news-ticker
|
209 |
msgid "Vertical margin"
|
210 |
+
msgstr ""
|
211 |
|
212 |
+
#: includes/meta-boxes.php:441
|
213 |
#@ ditty-news-ticker
|
214 |
msgid "Scroll speed"
|
215 |
+
msgstr ""
|
216 |
|
217 |
+
#: includes/meta-boxes.php:446
|
218 |
+
#: includes/meta-boxes.php:563
|
219 |
#@ ditty-news-ticker
|
220 |
msgid "Pause on mouse over"
|
221 |
+
msgstr ""
|
222 |
|
223 |
+
#: includes/meta-boxes.php:452
|
224 |
+
#: includes/meta-boxes.php:666
|
225 |
#@ ditty-news-ticker
|
226 |
msgid "Tick spacing"
|
227 |
+
msgstr ""
|
228 |
|
229 |
+
#: includes/meta-boxes.php:456
|
230 |
+
#: includes/meta-boxes.php:670
|
231 |
#@ ditty-news-ticker
|
232 |
msgid "Pixels"
|
233 |
+
msgstr ""
|
234 |
|
235 |
#: includes/meta-boxes.php:142
|
236 |
#@ ditty-news-ticker
|
237 |
msgid "Scroll Settings"
|
238 |
+
msgstr ""
|
239 |
|
240 |
+
#: includes/meta-boxes.php:521
|
241 |
#@ ditty-news-ticker
|
242 |
msgid "Rotation type"
|
243 |
+
msgstr ""
|
244 |
|
245 |
+
#: includes/meta-boxes.php:525
|
246 |
#@ ditty-news-ticker
|
247 |
msgid "Fade"
|
248 |
+
msgstr ""
|
249 |
|
250 |
+
#: includes/meta-boxes.php:526
|
251 |
#@ ditty-news-ticker
|
252 |
msgid "Slide left"
|
253 |
+
msgstr ""
|
254 |
|
255 |
+
#: includes/meta-boxes.php:527
|
256 |
#@ ditty-news-ticker
|
257 |
msgid "Slide right"
|
258 |
+
msgstr ""
|
259 |
|
260 |
+
#: includes/meta-boxes.php:528
|
261 |
#@ ditty-news-ticker
|
262 |
msgid "Slide up"
|
263 |
+
msgstr ""
|
264 |
|
265 |
+
#: includes/meta-boxes.php:529
|
266 |
#@ ditty-news-ticker
|
267 |
msgid "Slide down"
|
268 |
+
msgstr ""
|
269 |
|
270 |
+
#: includes/meta-boxes.php:530
|
271 |
#@ ditty-news-ticker
|
272 |
msgid "Dynamic slide direction"
|
273 |
+
msgstr ""
|
274 |
|
275 |
+
#: includes/meta-boxes.php:546
|
276 |
#@ ditty-news-ticker
|
277 |
msgid "Rotator padding"
|
278 |
+
msgstr ""
|
279 |
|
280 |
+
#: includes/meta-boxes.php:557
|
281 |
#@ ditty-news-ticker
|
282 |
msgid "Auto rotate"
|
283 |
+
msgstr ""
|
284 |
|
285 |
+
#: includes/meta-boxes.php:561
|
286 |
+
#: includes/meta-boxes.php:589
|
287 |
+
#: includes/meta-boxes.php:600
|
288 |
+
#: includes/meta-boxes.php:680
|
289 |
#@ ditty-news-ticker
|
290 |
msgid "Enable"
|
291 |
+
msgstr ""
|
292 |
|
293 |
+
#: includes/meta-boxes.php:562
|
294 |
#@ ditty-news-ticker
|
295 |
msgid "Seconds delay"
|
296 |
+
msgstr ""
|
297 |
|
298 |
+
#: includes/meta-boxes.php:569
|
299 |
#@ ditty-news-ticker
|
300 |
msgid "Rotate speed"
|
301 |
+
msgstr ""
|
302 |
|
303 |
+
#: includes/meta-boxes.php:573
|
304 |
#@ ditty-news-ticker
|
305 |
msgid "Tenths of a second"
|
306 |
+
msgstr ""
|
307 |
|
308 |
+
#: includes/meta-boxes.php:585
|
309 |
#@ ditty-news-ticker
|
310 |
msgid "Directional navigation"
|
311 |
+
msgstr ""
|
312 |
|
313 |
+
#: includes/meta-boxes.php:590
|
314 |
#@ ditty-news-ticker
|
315 |
msgid "Autohide navigation"
|
316 |
+
msgstr ""
|
317 |
|
318 |
+
#: includes/meta-boxes.php:596
|
319 |
#@ ditty-news-ticker
|
320 |
msgid "Control navigation"
|
321 |
+
msgstr ""
|
322 |
|
323 |
+
#: includes/meta-boxes.php:601
|
324 |
#@ ditty-news-ticker
|
325 |
msgid "Numbers"
|
326 |
+
msgstr ""
|
327 |
|
328 |
+
#: includes/meta-boxes.php:602
|
329 |
#@ ditty-news-ticker
|
330 |
msgid "Buttons"
|
331 |
+
msgstr ""
|
332 |
|
333 |
#: includes/meta-boxes.php:153
|
334 |
#@ ditty-news-ticker
|
335 |
msgid "Rotate Settings"
|
336 |
+
msgstr ""
|
337 |
|
338 |
+
#: includes/meta-boxes.php:655
|
339 |
#@ ditty-news-ticker
|
340 |
msgid "List padding"
|
341 |
+
msgstr ""
|
342 |
|
343 |
#: includes/meta-boxes.php:164
|
344 |
#@ ditty-news-ticker
|
345 |
msgid "List Settings"
|
346 |
+
msgstr ""
|
347 |
|
348 |
+
#: includes/meta-boxes.php:745
|
349 |
#@ ditty-news-ticker
|
350 |
msgid "Display title"
|
351 |
+
msgstr ""
|
352 |
|
353 |
+
#: includes/meta-boxes.php:746
|
354 |
#@ ditty-news-ticker
|
355 |
msgid "Inline title"
|
356 |
+
msgstr ""
|
357 |
|
358 |
+
#: includes/meta-boxes.php:758
|
359 |
#@ ditty-news-ticker
|
360 |
msgid "Ticker width <em>(optional)</em>"
|
361 |
+
msgstr ""
|
362 |
|
363 |
#: includes/meta-boxes.php:175
|
364 |
#@ ditty-news-ticker
|
365 |
msgid "Global Settings"
|
366 |
+
msgstr ""
|
367 |
|
368 |
#: includes/meta-boxes.php:21
|
369 |
#@ ditty-news-ticker
|
370 |
msgid "Select Shortcode"
|
371 |
+
msgstr ""
|
372 |
|
373 |
#: includes/meta-boxes.php:31
|
374 |
#@ ditty-news-ticker
|
375 |
msgid "Select Function"
|
376 |
+
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
377 |
|
378 |
#: includes/post-types.php:20
|
379 |
#: includes/post-types.php:31
|
380 |
#@ ditty-news-ticker
|
381 |
msgid "News Tickers"
|
382 |
+
msgstr ""
|
383 |
|
384 |
#: includes/post-types.php:21
|
385 |
#@ ditty-news-ticker
|
386 |
msgid "News Ticker"
|
387 |
+
msgstr ""
|
388 |
|
389 |
#: includes/post-types.php:22
|
390 |
#@ ditty-news-ticker
|
391 |
msgid "Add New"
|
392 |
+
msgstr ""
|
393 |
|
394 |
#: includes/post-types.php:23
|
395 |
#@ ditty-news-ticker
|
396 |
msgid "Add New News Ticker"
|
397 |
+
msgstr ""
|
398 |
|
399 |
#: includes/post-types.php:24
|
400 |
#@ ditty-news-ticker
|
401 |
msgid "Edit News Ticker"
|
402 |
+
msgstr ""
|
403 |
|
404 |
#: includes/post-types.php:25
|
405 |
#@ ditty-news-ticker
|
406 |
msgid "New News Ticker"
|
407 |
+
msgstr ""
|
408 |
|
409 |
#: includes/post-types.php:26
|
410 |
#@ ditty-news-ticker
|
411 |
msgid "View News Ticker"
|
412 |
+
msgstr ""
|
413 |
|
414 |
#: includes/post-types.php:27
|
415 |
#@ ditty-news-ticker
|
416 |
msgid "Search News Tickers"
|
417 |
+
msgstr ""
|
418 |
|
419 |
#: includes/post-types.php:28
|
420 |
#@ ditty-news-ticker
|
421 |
msgid "No News Tickers Found"
|
422 |
+
msgstr ""
|
423 |
|
424 |
#: includes/post-types.php:29
|
425 |
#@ ditty-news-ticker
|
426 |
msgid "No News Tickers Found In Trash"
|
427 |
+
msgstr ""
|
428 |
|
429 |
+
#: includes/post-types.php:63
|
430 |
#@ ditty-news-ticker
|
431 |
msgid "Ditty News Ticker Updated!"
|
432 |
+
msgstr ""
|
433 |
|
434 |
#: includes/settings.php:11
|
435 |
#: includes/settings.php:12
|
436 |
#@ ditty-news-ticker
|
437 |
msgid "Settings"
|
438 |
+
msgstr ""
|
439 |
|
440 |
#: includes/settings.php:128
|
441 |
#@ ditty-news-ticker
|
442 |
msgid "Custom CSS"
|
443 |
+
msgstr ""
|
444 |
|
445 |
#: includes/settings.php:44
|
446 |
#@ ditty-news-ticker
|
447 |
msgid "Ditty News Ticker Settings"
|
448 |
+
msgstr ""
|
449 |
|
450 |
#: includes/widget.php:42
|
451 |
#@ ditty-news-ticker
|
452 |
msgid "Displays a Ditty News Ticker."
|
453 |
+
msgstr ""
|
454 |
|
455 |
#: includes/widget.php:137
|
456 |
#@ ditty-news-ticker
|
457 |
msgid "Title:"
|
458 |
+
msgstr ""
|
459 |
|
460 |
#: includes/widget.php:143
|
461 |
#@ ditty-news-ticker
|
462 |
msgid "Select a Ticker:"
|
463 |
+
msgstr ""
|
464 |
|
465 |
#: includes/widget.php:161
|
466 |
#@ ditty-news-ticker
|
467 |
msgid "Display Ticker Title?"
|
468 |
+
msgstr ""
|
469 |
|
470 |
#: includes/help.php:112
|
471 |
#@ ditty-news-ticker
|
472 |
msgid "View DNT extensions"
|
473 |
+
msgstr ""
|
474 |
|
475 |
+
#: includes/meta-boxes.php:229
|
476 |
#@ ditty-news-ticker
|
477 |
msgid "NF"
|
478 |
+
msgstr ""
|
479 |
|
480 |
#: includes/settings.php:28
|
481 |
#@ ditty-news-ticker
|
482 |
msgid "The global settings to your news tickers."
|
483 |
+
msgstr ""
|
484 |
|
485 |
+
#: includes/meta-boxes.php:413
|
486 |
#@ ditty-news-ticker
|
487 |
msgid "Show first tick on init"
|
488 |
msgstr ""
|
489 |
|
490 |
+
#: includes/meta-boxes.php:752
|
491 |
#@ ditty-news-ticker
|
492 |
msgid "Randomly shuffle the ticks"
|
493 |
msgstr ""
|
494 |
|
495 |
+
#: includes/meta-boxes.php:764
|
496 |
#@ ditty-news-ticker
|
497 |
msgid "Offset ticks"
|
498 |
msgstr ""
|
499 |
|
500 |
+
#: includes/meta-boxes.php:764
|
501 |
#@ ditty-news-ticker
|
502 |
msgid "px from the edge"
|
503 |
msgstr ""
|
504 |
|
505 |
+
#: includes/meta-boxes.php:765
|
506 |
#@ ditty-news-ticker
|
507 |
msgid "The amount of pixels ticks should start and end off the screen."
|
508 |
msgstr ""
|
532 |
msgid "Mixed Ticker Items"
|
533 |
msgstr ""
|
534 |
|
535 |
+
#: includes/meta-boxes.php:309
|
|
|
|
|
|
|
|
|
|
|
536 |
#@ ditty-news-ticker
|
537 |
msgid "Tick selection"
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: includes/meta-boxes.php:310
|
541 |
#@ ditty-news-ticker
|
542 |
msgid "Select the ticks you would like to display by choosing the tick type and the offset position of the selected feed"
|
543 |
msgstr ""
|
544 |
|
545 |
+
#: includes/meta-boxes.php:338
|
546 |
#@ ditty-news-ticker
|
547 |
msgid "Type:"
|
548 |
msgstr ""
|
549 |
|
550 |
+
#: includes/meta-boxes.php:340
|
551 |
#@ ditty-news-ticker
|
552 |
msgid "Select Tick Type"
|
553 |
msgstr ""
|
554 |
|
555 |
+
#: includes/meta-boxes.php:348
|
556 |
#@ ditty-news-ticker
|
557 |
msgid "Offset:"
|
558 |
msgstr ""
|
597 |
msgid "Add an unlimited number of ticks to your ticker"
|
598 |
msgstr ""
|
599 |
|
600 |
+
#: includes/meta-boxes.php:406
|
601 |
#@ ditty-news-ticker
|
602 |
msgid "Set the scroll direction of the ticker"
|
603 |
msgstr ""
|
604 |
|
605 |
+
#: includes/meta-boxes.php:420
|
606 |
+
#: includes/meta-boxes.php:537
|
607 |
#@ ditty-news-ticker
|
608 |
msgid "Override the auto dimensions with specific values"
|
609 |
msgstr ""
|
610 |
|
611 |
+
#: includes/meta-boxes.php:431
|
612 |
#@ ditty-news-ticker
|
613 |
msgid "Set the vertical spacing of the scrolling data"
|
614 |
msgstr ""
|
615 |
|
616 |
+
#: includes/meta-boxes.php:442
|
617 |
#@ ditty-news-ticker
|
618 |
msgid "Set the speed of the scrolling data"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: includes/meta-boxes.php:453
|
622 |
#@ ditty-news-ticker
|
623 |
msgid "Set the spacing between scrolling data"
|
624 |
msgstr ""
|
625 |
|
626 |
+
#: includes/meta-boxes.php:522
|
627 |
#@ ditty-news-ticker
|
628 |
msgid "Set the type of rotation for the ticker"
|
629 |
msgstr ""
|
630 |
|
631 |
+
#: includes/meta-boxes.php:547
|
632 |
#@ ditty-news-ticker
|
633 |
msgid "Set the vertical spacing of the rotating data"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: includes/meta-boxes.php:558
|
637 |
#@ ditty-news-ticker
|
638 |
msgid "Set the delay between rotations"
|
639 |
msgstr ""
|
640 |
|
641 |
+
#: includes/meta-boxes.php:570
|
642 |
#@ ditty-news-ticker
|
643 |
msgid "Set the speed & easing of the rotation"
|
644 |
msgstr ""
|
645 |
|
646 |
+
#: includes/meta-boxes.php:586
|
647 |
#@ ditty-news-ticker
|
648 |
msgid "Set the directional navigation options"
|
649 |
msgstr ""
|
650 |
|
651 |
+
#: includes/meta-boxes.php:597
|
652 |
#@ ditty-news-ticker
|
653 |
msgid "Set the control navigation options"
|
654 |
msgstr ""
|
655 |
|
656 |
+
#: includes/meta-boxes.php:627
|
657 |
+
#: includes/meta-boxes.php:931
|
658 |
#@ ditty-news-ticker
|
659 |
msgid "« Previous"
|
660 |
msgstr ""
|
661 |
|
662 |
+
#: includes/meta-boxes.php:628
|
663 |
+
#: includes/meta-boxes.php:932
|
664 |
#@ ditty-news-ticker
|
665 |
msgid "Next »"
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: includes/meta-boxes.php:656
|
669 |
#@ ditty-news-ticker
|
670 |
msgid "Set the vertical spacing of the list container"
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: includes/meta-boxes.php:667
|
674 |
#@ ditty-news-ticker
|
675 |
msgid "Set the spacing between ticks"
|
676 |
msgstr ""
|
677 |
|
678 |
+
#: includes/meta-boxes.php:676
|
679 |
#@ ditty-news-ticker
|
680 |
msgid "List paging"
|
681 |
msgstr ""
|
682 |
|
683 |
+
#: includes/meta-boxes.php:677
|
684 |
#@ ditty-news-ticker
|
685 |
msgid "Break the list up into pages"
|
686 |
msgstr ""
|
687 |
|
688 |
+
#: includes/meta-boxes.php:681
|
689 |
#@ ditty-news-ticker
|
690 |
msgid "Ticks per page"
|
691 |
msgstr ""
|
692 |
|
693 |
+
#: includes/meta-boxes.php:683
|
694 |
#@ ditty-news-ticker
|
695 |
msgid "Enable previous & next links"
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: includes/meta-boxes.php:685
|
699 |
#@ ditty-news-ticker
|
700 |
msgid "Previous text"
|
701 |
msgstr ""
|
702 |
|
703 |
+
#: includes/meta-boxes.php:686
|
704 |
#@ ditty-news-ticker
|
705 |
msgid "Next text"
|
706 |
msgstr ""
|
707 |
|
708 |
+
#: includes/meta-boxes.php:771
|
709 |
#@ ditty-news-ticker
|
710 |
msgid "Grid Display"
|
711 |
msgstr ""
|
712 |
|
713 |
+
#: includes/meta-boxes.php:772
|
714 |
#@ ditty-news-ticker
|
715 |
msgid "Display ticks in a grid"
|
716 |
msgstr ""
|
717 |
|
718 |
+
#: includes/meta-boxes.php:773
|
719 |
#@ ditty-news-ticker
|
720 |
msgid "Render empty rows"
|
721 |
msgstr ""
|
722 |
|
723 |
+
#: includes/meta-boxes.php:774
|
724 |
#@ ditty-news-ticker
|
725 |
msgid "Force equal column width"
|
726 |
msgstr ""
|
727 |
|
728 |
+
#: includes/meta-boxes.php:776
|
729 |
#@ ditty-news-ticker
|
730 |
msgid "Columns"
|
731 |
msgstr ""
|
732 |
|
733 |
+
#: includes/meta-boxes.php:777
|
734 |
#@ ditty-news-ticker
|
735 |
msgid "Rows"
|
736 |
msgstr ""
|
737 |
|
738 |
+
#: includes/meta-boxes.php:779
|
739 |
#@ ditty-news-ticker
|
740 |
msgid "Cell padding"
|
741 |
msgstr ""
|
765 |
msgid "The content in the visual editors will disappear after re-arranging ticks. That content will re-populate after re-saving the ticker."
|
766 |
msgstr ""
|
767 |
|
768 |
+
#: includes/edit-columns.php:138
|
769 |
+
#@ ditty-news-ticker
|
770 |
+
msgid "Show all Types"
|
771 |
+
msgstr ""
|
772 |
+
|
773 |
+
#: includes/edit-columns.php:147
|
774 |
+
#@ ditty-news-ticker
|
775 |
+
msgid "Show all Modes"
|
776 |
+
msgstr ""
|
777 |
+
|
778 |
+
#: includes/filters.php:282
|
779 |
+
#@ ditty-news-ticker
|
780 |
+
msgid "<i class=\"mtphr-dnt-icon-gear\"></i> Edit ticker"
|
781 |
+
msgstr ""
|
782 |
+
|
783 |
+
#: includes/meta-boxes.php:224
|
784 |
+
#@ ditty-news-ticker
|
785 |
+
msgid "<strong>Notice:</strong> When using the WYSIWYG editor you must save your ticker after adding or re-arranging ticks."
|
786 |
+
msgstr ""
|
787 |
+
|
788 |
+
#: includes/post-types.php:45
|
789 |
+
#@ ditty-news-ticker
|
790 |
+
msgid "ticker"
|
791 |
+
msgstr ""
|
792 |
+
|
readme.txt
CHANGED
@@ -54,6 +54,14 @@ Each individual Ticker post has multiple settings to customize.
|
|
54 |
|
55 |
== Changelog ==
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
= 1.4.4 =
|
58 |
* Made ditty_new_ticker post type public
|
59 |
* Included ditty_new_ticker post type in nav menus
|
@@ -217,4 +225,4 @@ Each individual Ticker post has multiple settings to customize.
|
|
217 |
|
218 |
== Upgrade Notice ==
|
219 |
|
220 |
-
|
54 |
|
55 |
== Changelog ==
|
56 |
|
57 |
+
= 1.4.5 =
|
58 |
+
* Removed metaboxer code & files, which are no longer used
|
59 |
+
* Merged the metabox list jQuery functionality
|
60 |
+
* Removed ajax.php file
|
61 |
+
* Removed image navigation & buttons. Replaced with icon fonts
|
62 |
+
* Added type & mode filters to edit screen
|
63 |
+
* Added option to add aquick edit link to tickers for admins/editors
|
64 |
+
|
65 |
= 1.4.4 =
|
66 |
* Made ditty_new_ticker post type public
|
67 |
* Included ditty_new_ticker post type in nav menus
|
225 |
|
226 |
== Upgrade Notice ==
|
227 |
|
228 |
+
Metabox updates. Converted image graphics to icon fonts. Added option to add quick edit links to tickers. Added type & mode filters to edit screen.
|