Version Description
- May 09 2016 =
- New: Add option to enable/disable "Open first item by default" for Collapsible List
- Update: Leverage WordPress core translations (for "Read More", "No posts found." ...) to minimize user translation effort
- Update: Update setting text in View dashboard to improve usability
Download this release
Release Info
Developer | PT Guy |
Plugin | Content Views – Post Grid & List for WordPress |
Version | 1.8.4 |
Comparing to | |
See all releases |
Code changes from version 1.8.3 to 1.8.4
- README.txt +44 -47
- admin/assets/css/admin.css +10 -5
- admin/assets/js/admin.js +125 -189
- admin/content-views-admin.php +17 -14
- admin/includes/options.php +10 -30
- admin/views/view.php +66 -51
- assets/bootstrap/js/bootstrap.custom.min.js +1 -1
- content-views.php +2 -2
- includes/functions.php +12 -12
- includes/hooks.php +10 -10
- includes/html-viewtype.php +5 -4
- includes/html.php +18 -18
- includes/settings.php +113 -73
- includes/values.php +49 -51
- languages/content-views-query-and-display-post-page.po +197 -220
- public/assets/css/public.css +2 -0
- public/content-views.php +28 -28
README.txt
CHANGED
@@ -1,71 +1,63 @@
|
|
1 |
-
=== Display
|
2 |
Contributors: pt-guy
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JGUF974QBRKQE
|
4 |
-
Tags: post, post grid,
|
5 |
Requires at least: 3.3
|
6 |
-
Tested up to: 4.5
|
7 |
-
Stable tag: 1.8.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
|
16 |
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
-
|
20 |
-
* order posts by title, date, ID
|
21 |
-
* display posts with beautiful pagination
|
22 |
-
* display featured image in various sizes (thumbnail, medium, large, full)
|
23 |
|
24 |
-
|
25 |
|
26 |
-
|
27 |
-
|
28 |
-
**
|
29 |
-
|
30 |
-
* Step 1 : Filter any posts by category, tag, author...
|
31 |
-
* Step 2 : Select a layout (grid, scrollable list, collapsible list) to display your posts. You can select what data (title, content/excerpt, thumbnail, meta fields) to display, too.
|
32 |
-
* Step 3 : Paste shortcode **[pt_view id="VIEW_ID"]** to page, widget... editor; or paste `<?php echo do_shortcode("[pt_view id=VIEW_ID]"); ?>` to WordPress theme file.
|
33 |
|
34 |
|
35 |
[youtube https://www.youtube.com/watch?v=drxqtCiaw4I]
|
36 |
|
37 |
|
38 |
-
=
|
39 |
-
|
40 |
-
**in Step 1:**
|
41 |
|
42 |
-
* display
|
43 |
-
* filter any posts by ID, category, tag, author, keyword, status
|
44 |
-
*
|
45 |
-
* include/exclude posts to display
|
46 |
-
* sort posts by Id, Title, Date in ascending, descending order
|
47 |
* limit number of posts to display
|
48 |
-
|
49 |
-
**in Step 2:**
|
50 |
-
|
51 |
-
* select a responsive layout to display posts: Grid, Scrollable list, Collapsible list
|
52 |
-
* select number of columns in Grid layout
|
53 |
-
* select what data (thumbnail, title, content, meta fields) to display
|
54 |
-
* select thumbnail size
|
55 |
-
* display full content, or display excerpt with specific number of words
|
56 |
-
* select what meta-fields (date, author, categories/tags, comment count) to display
|
57 |
* enable/disable pagination
|
58 |
-
*
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
*
|
67 |
-
*
|
68 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
* And much more...
|
70 |
|
71 |
[Get Content Views Pro](http://www.contentviewspro.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Get Content Views Pro").
|
@@ -136,6 +128,11 @@ If you are using "Your latest posts" as home page, you should paste this code `<
|
|
136 |
|
137 |
== Changelog ==
|
138 |
|
|
|
|
|
|
|
|
|
|
|
139 |
= 1.8.3 - April 15 2016 =
|
140 |
* New: [Collapsible list] Show first item by default
|
141 |
* Fix: Blank excerpt when post content was made all by shortcodes
|
1 |
+
=== Display post grid, list without coding - Content Views ===
|
2 |
Contributors: pt-guy
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JGUF974QBRKQE
|
4 |
+
Tags: post, post grid, grid, grid post, recent post, page, query, column, author, category, tag, responsive, excerpt, title, taxonomy, thumbnail, pagination, date, scrollable, collapsible
|
5 |
Requires at least: 3.3
|
6 |
+
Tested up to: 4.5.2
|
7 |
+
Stable tag: 1.8.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Display any post, page anywhere in amazing Grid and List without coding!
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
With Content Views, you can:
|
16 |
|
17 |
+
* display latest posts in seconds
|
18 |
+
* display post grid, post list anywhere (in page, widget, theme file)
|
19 |
+
* query any post by ID, category, tag, author...
|
20 |
+
* sort post by title, date, ID
|
21 |
+
* display post with Ajax, non-Ajax pagination
|
22 |
+
* display featured image of post in various sizes (thumbnail, medium, large, full)
|
23 |
|
24 |
+
quickly & easily, without any line of code!
|
|
|
|
|
|
|
25 |
|
26 |
+
It provides you an intuitive form to filter & display posts in responsive grid, list layout quickly, in 3 simple steps:
|
27 |
|
28 |
+
* Step 1 : Filter any posts (by ID, category, tag, author, keyword, status)
|
29 |
+
* Step 2 : Select a layout (grid, scrollable list, collapsible list) to display your posts. You can select what info of post (title, content/excerpt, thumbnail, meta fields) to display, too.
|
30 |
+
* Step 3 : Paste shortcode **[pt_view id="VIEW_ID"]** to page, widget... editor; or paste `<?php echo do_shortcode("[pt_view id=VIEW_ID]"); ?>` to WordPress theme file to show these posts.
|
|
|
|
|
|
|
|
|
31 |
|
32 |
|
33 |
[youtube https://www.youtube.com/watch?v=drxqtCiaw4I]
|
34 |
|
35 |
|
36 |
+
= Plugin features: =
|
|
|
|
|
37 |
|
38 |
+
* display posts, pages in responsive, mobile friendly layouts (Grid, Scrollable list, Collapsible list) without coding
|
39 |
+
* filter any posts (by post ID, category, tag, post author, keyword, post status)
|
40 |
+
* sort posts by ID, title, date in ascending, descending order
|
|
|
|
|
41 |
* limit number of posts to display
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
* enable/disable pagination
|
43 |
+
* select what info of post (thumbnail, title, content, meta fields) to display
|
44 |
+
* select thumbnail size of post (thumbnail, medium, large, full)
|
45 |
+
* display full post content, or display post excerpt with specific number of words
|
46 |
+
* select what meta-fields (post date, post author, category, tag, comment count) to display
|
47 |
+
* custom actions, filters hook anywhere to customize output
|
48 |
+
|
49 |
+
= Premium features: =
|
50 |
+
|
51 |
+
* Most amazing layouts: Pinterest, Masonry, Facebook Timeline...
|
52 |
+
* Unlimited possible output with drag & drop (to change display order of fields), custom style settings (for title, content, read-more button...)
|
53 |
+
* Replace default layout in Category page, Search result page, Archive page... by amazing layout
|
54 |
+
* Support custom post type plugins: WooCommerce, Easy Digital Downloads, Events Manager...
|
55 |
+
* Support custom field plugins: Advanced Custom Fields, Pods framework, Toolset Types...
|
56 |
+
* Support membership plugins: Paid Memberships Pro, Members, Ultimate Member
|
57 |
+
* Support translation plugins: WPML, Polylang, qTranslate
|
58 |
+
* Filterable grid by categories, tags... with cool animation
|
59 |
+
* Nice animation on mouse over post thumbnail
|
60 |
+
* Ajax Load more, Infinite scroll pagination
|
61 |
* And much more...
|
62 |
|
63 |
[Get Content Views Pro](http://www.contentviewspro.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Get Content Views Pro").
|
128 |
|
129 |
== Changelog ==
|
130 |
|
131 |
+
= 1.8.4 - May 09 2016 =
|
132 |
+
* New: Add option to enable/disable "Open first item by default" for Collapsible List
|
133 |
+
* Update: Leverage WordPress core translations (for "Read More", "No posts found." ...) to minimize user translation effort
|
134 |
+
* Update: Update setting text in View dashboard to improve usability
|
135 |
+
|
136 |
= 1.8.3 - April 15 2016 =
|
137 |
* New: [Collapsible list] Show first item by default
|
138 |
* Fix: Blank excerpt when post content was made all by shortcodes
|
admin/assets/css/admin.css
CHANGED
@@ -44,6 +44,7 @@ html {
|
|
44 |
clear: both;
|
45 |
margin: 0px 0 2px;
|
46 |
float: left;
|
|
|
47 |
}
|
48 |
|
49 |
/* Overwrite Bootstrap */
|
@@ -228,11 +229,6 @@ html {
|
|
228 |
z-index: 1001;
|
229 |
}
|
230 |
|
231 |
-
/* Field dislay */
|
232 |
-
.pt-cv-bg-none {
|
233 |
-
background: #fff;
|
234 |
-
}
|
235 |
-
|
236 |
/* Sortable */
|
237 |
.pt-wrap .ui-sortable {
|
238 |
background: #FFF9D7;
|
@@ -302,6 +298,15 @@ html {
|
|
302 |
}
|
303 |
/* End Append group */
|
304 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
@media (max-width: 991px) {
|
306 |
#pt-cv-form-view .nav .glyphicon {
|
307 |
display: none;
|
44 |
clear: both;
|
45 |
margin: 0px 0 2px;
|
46 |
float: left;
|
47 |
+
font-style: italic;
|
48 |
}
|
49 |
|
50 |
/* Overwrite Bootstrap */
|
229 |
z-index: 1001;
|
230 |
}
|
231 |
|
|
|
|
|
|
|
|
|
|
|
232 |
/* Sortable */
|
233 |
.pt-wrap .ui-sortable {
|
234 |
background: #FFF9D7;
|
298 |
}
|
299 |
/* End Append group */
|
300 |
|
301 |
+
/* Others */
|
302 |
+
.pt-cv-thumb-position {background-color:#fff; padding-bottom:10px}
|
303 |
+
.pt-cv-group .panel .panel {border-color: #bce8f1}
|
304 |
+
.pt-cv-group .panel .panel > .panel-heading {
|
305 |
+
color: #31708f;
|
306 |
+
background-color: #d9edf7;
|
307 |
+
border-color: #bce8f1
|
308 |
+
}
|
309 |
+
|
310 |
@media (max-width: 991px) {
|
311 |
#pt-cv-form-view .nav .glyphicon {
|
312 |
display: none;
|
admin/assets/js/admin.js
CHANGED
@@ -14,15 +14,82 @@
|
|
14 |
$.PT_CV_Admin = $.PT_CV_Admin || { };
|
15 |
PT_CV_ADMIN = PT_CV_ADMIN || { };
|
16 |
ajaxurl = ajaxurl || { };
|
|
|
17 |
|
18 |
$.PT_CV_Admin = function ( options ) {
|
19 |
-
this.options =
|
20 |
-
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
23 |
};
|
24 |
|
25 |
$.PT_CV_Admin.prototype = {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
/**
|
27 |
* Toggle panel when click Show/Hide icon on Heading
|
28 |
*
|
@@ -53,44 +120,27 @@
|
|
53 |
*/
|
54 |
_toggle_taxonomy_relation: function () {
|
55 |
var $self = this;
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
// Taxonomies Settings wrapper div
|
61 |
-
var $wrap_taxonomies = $( '#' + _prefix + 'group-taxonomy' );
|
62 |
-
|
63 |
-
// Get Taxonomy checkbox item
|
64 |
-
var taxonomy_item = '.' + _prefix + 'taxonomy-item';
|
65 |
-
|
66 |
-
// Run on page load
|
67 |
-
$self._do_toggle_taxonomy_relation( $taxonomy_relation, $wrap_taxonomies );
|
68 |
-
|
69 |
-
// Run on change
|
70 |
-
$( taxonomy_item ).change( function () {
|
71 |
-
$self._do_toggle_taxonomy_relation( $taxonomy_relation, $wrap_taxonomies );
|
72 |
} );
|
73 |
},
|
74 |
/**
|
75 |
* Toggle Taxonomy Relation setting by number of selected taxonomies
|
76 |
*
|
77 |
-
* @param {type} $taxonomy_relation
|
78 |
-
* @param {type} $wrap_taxonomies
|
79 |
* @returns {undefined}
|
80 |
*/
|
81 |
-
_do_toggle_taxonomy_relation: function (
|
82 |
-
var $
|
83 |
-
var
|
84 |
|
85 |
// If there is no taxonomies
|
86 |
if ( $wrap_taxonomies.find( '.' + _prefix + 'taxonomies .checkbox' ).filter( function () {
|
87 |
return !$( this ).hasClass( 'hidden' ) && $( this ).find( 'input:checked' ).length;
|
88 |
} ).length > 1 ) {
|
89 |
$taxonomy_relation.removeClass( 'hidden' );
|
90 |
-
$( '.pt-wrap' ).trigger( _prefix + 'multiple-taxonomies', [ 1, $self.options.onload ] );
|
91 |
} else {
|
92 |
$taxonomy_relation.addClass( 'hidden' );
|
93 |
-
$( '.pt-wrap' ).trigger( _prefix + 'multiple-taxonomies', [ 0, $self.options.onload ] );
|
94 |
}
|
95 |
},
|
96 |
/**
|
@@ -112,13 +162,12 @@
|
|
112 |
/**
|
113 |
* Do toggle all dependency groups
|
114 |
*
|
115 |
-
* @param {type} $toggle_data_js_
|
116 |
* @returns {undefined}
|
117 |
*/
|
118 |
-
dependence_do_all: function (
|
119 |
var $self = this;
|
120 |
-
var
|
121 |
-
|
122 |
$.each( $toggle_data_js, function ( idx, obj ) {
|
123 |
// Obj_sub: an object contains (dependence_id, operator, expect_val)
|
124 |
$.each( obj, function ( key, obj_sub ) {
|
@@ -159,7 +208,6 @@
|
|
159 |
* @returns {undefined}
|
160 |
*/
|
161 |
_dependence_element: function ( dependence_id, this_val, operator, expect_val ) {
|
162 |
-
|
163 |
var dependence_el = $( "#" + dependence_id );
|
164 |
var pass = 0;
|
165 |
switch ( operator ) {
|
@@ -205,21 +253,21 @@
|
|
205 |
* Toggle a group inside Panel group when check/uncheck a checkbox inside checboxes list
|
206 |
*
|
207 |
* @param {type} selector
|
208 |
-
* @param {type}
|
209 |
* @returns {undefined}
|
210 |
*/
|
211 |
-
toggle_group: function ( selector,
|
212 |
var $self = this;
|
213 |
// Run on page load
|
214 |
$( selector ).each( function () {
|
215 |
-
$self._toggle_each_group( $( this ),
|
216 |
} );
|
217 |
// Run on change
|
218 |
$( selector ).each( function () {
|
219 |
$( this ).change( function () {
|
220 |
var this_ = $( this );
|
221 |
setTimeout( function () {
|
222 |
-
$self._toggle_each_group( this_,
|
223 |
}, 200 );
|
224 |
} );
|
225 |
} );
|
@@ -228,15 +276,14 @@
|
|
228 |
* Toggle group depends on selector value
|
229 |
*
|
230 |
* @param {type} $this
|
231 |
-
* @param {type}
|
232 |
* @returns {undefined}
|
233 |
*/
|
234 |
-
_toggle_each_group: function ( $this,
|
235 |
var $self = this;
|
236 |
-
var _prefix = $self.options._prefix;
|
237 |
if ( $this.is( 'select' ) || ( ( $this.is( ':checkbox' ) || $this.is( ':radio' ) ) && $this.is( ':checked' ) ) ) {
|
238 |
// Get id of element A which needs to toggle
|
239 |
-
var toggle_id = '#' +
|
240 |
|
241 |
// Get siblings groups of A
|
242 |
var other_groups = $( toggle_id ).parent().children( '.' + _prefix + 'group' ).not( toggle_id );
|
@@ -270,7 +317,7 @@
|
|
270 |
}, 2000 );
|
271 |
|
272 |
} else {
|
273 |
-
$( '#' +
|
274 |
}
|
275 |
},
|
276 |
/**
|
@@ -280,38 +327,41 @@
|
|
280 |
*/
|
281 |
_content_type: function () {
|
282 |
var $self = this;
|
283 |
-
var _prefix = $self.options._prefix;
|
284 |
-
|
285 |
var $wrap_taxonomies = $( '#' + _prefix + 'group-taxonomy' );
|
286 |
-
var $taxonomy_other_settings = $( '
|
287 |
var $taxonomies = $( '.' + _prefix + 'taxonomy-item' );
|
288 |
|
289 |
var $no_taxonomy = $( '<div/>', {
|
290 |
'id': _prefix + 'no-taxonomy',
|
291 |
'class': _prefix + 'text',
|
292 |
-
'text': PT_CV_ADMIN.text.no_taxonomy
|
293 |
-
} ).
|
294 |
|
295 |
-
// Hide all Taxonomies at beginning
|
296 |
var fn_taxonomy_hide = function ( taxonomies ) {
|
|
|
297 |
taxonomies.each( function () {
|
298 |
$( this ).parents( '.checkbox' ).addClass( 'hidden' );
|
299 |
} );
|
300 |
|
301 |
-
// Toggle show
|
302 |
$no_taxonomy.addClass( 'hidden' );
|
303 |
-
$no_taxonomy.next( '.text-muted' ).removeClass( 'hidden' );
|
304 |
-
$taxonomy_other_settings.removeClass( 'hidden' );
|
305 |
|
306 |
-
// Hide all
|
307 |
$( '.panel-group.terms' ).find( '.' + _prefix + 'group' ).addClass( 'hidden' );
|
308 |
};
|
309 |
|
310 |
// Run on page load
|
311 |
fn_taxonomy_hide( $taxonomies );
|
312 |
|
313 |
-
//
|
314 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
315 |
if ( typeof this_val === 'undefined' ) {
|
316 |
return;
|
317 |
}
|
@@ -321,11 +371,10 @@
|
|
321 |
$taxonomies.attr( 'checked', false );
|
322 |
|
323 |
// Toggle Taxonomy Relation setting
|
324 |
-
|
325 |
-
$self._do_toggle_taxonomy_relation( $taxonomy_relation, $wrap_taxonomies );
|
326 |
}
|
327 |
|
328 |
-
// Show taxonomies
|
329 |
if ( this_val !== '' ) {
|
330 |
fn_taxonomy_hide( $taxonomies );
|
331 |
|
@@ -336,13 +385,11 @@
|
|
336 |
} ).parents( '.checkbox' ).removeClass( 'hidden' );
|
337 |
}
|
338 |
|
339 |
-
// Show there is no
|
340 |
if ( $wrap_taxonomies.find( '.' + _prefix + 'taxonomies .checkbox' ).filter( function () {
|
341 |
return !$( this ).hasClass( 'hidden' );
|
342 |
} ).length === 0 ) {
|
343 |
-
// Toggle hide
|
344 |
$no_taxonomy.removeClass( 'hidden' );
|
345 |
-
$no_taxonomy.next( '.text-muted' ).addClass( 'hidden' );
|
346 |
$taxonomy_other_settings.addClass( 'hidden' );
|
347 |
}
|
348 |
|
@@ -350,27 +397,21 @@
|
|
350 |
$( '.pt-wrap' ).trigger( 'content-type-change', [ this_val ] );
|
351 |
};
|
352 |
|
353 |
-
var content_type = '[name="' + _prefix + 'content-type' + '"]';
|
354 |
-
|
355 |
// Run on page load
|
356 |
-
fn_content_type(
|
357 |
|
358 |
// Run on change
|
359 |
$( content_type ).change( function () {
|
360 |
-
fn_content_type(
|
361 |
} );
|
362 |
},
|
363 |
/**
|
364 |
* Preview handle
|
365 |
*
|
366 |
-
* @param {string} _nonce
|
367 |
* @returns {undefined}
|
368 |
*/
|
369 |
-
preview: function (
|
370 |
var $self = this;
|
371 |
-
var _prefix = $self.options._prefix;
|
372 |
-
|
373 |
-
// Store previous offset top position
|
374 |
var offset_top;
|
375 |
|
376 |
$( '#' + _prefix + 'show-preview' ).click( function ( e ) {
|
@@ -412,7 +453,7 @@
|
|
412 |
// Get settings data
|
413 |
var data = $( '#' + _prefix + 'form-view' ).serialize();
|
414 |
// Call handle function
|
415 |
-
$self._preview_request( $preview, data,
|
416 |
} else {
|
417 |
// Scroll to previous position
|
418 |
$( 'html, body' ).animate( {
|
@@ -434,19 +475,15 @@
|
|
434 |
*
|
435 |
* @param {object} preview_box The jqurey object
|
436 |
* @param {string} _data
|
437 |
-
* @param {string} _nonce The generated nonce
|
438 |
* @param {object} $this_btn The Show/Hide preview button
|
439 |
* @returns void
|
440 |
*/
|
441 |
-
_preview_request: function ( preview_box, _data,
|
442 |
var $self = this;
|
443 |
-
var _prefix = $self.options._prefix;
|
444 |
-
|
445 |
-
// Setup data
|
446 |
var data = {
|
447 |
action: 'preview_request',
|
448 |
data: _data,
|
449 |
-
ajax_nonce: _nonce
|
450 |
};
|
451 |
|
452 |
// Sent POST request
|
@@ -482,14 +519,7 @@
|
|
482 |
* @returns {undefined}
|
483 |
*/
|
484 |
_thumbnail_settings: function () {
|
485 |
-
|
486 |
-
|
487 |
-
/**
|
488 |
-
* Toggle 'Thumbnail settings' when change 'Layout format'
|
489 |
-
*
|
490 |
-
* @param this_val Layout format value
|
491 |
-
* @returns void
|
492 |
-
*/
|
493 |
var fn_thumbnail_setting = function ( this_val ) {
|
494 |
var $show_thumbnail = $( '[name="' + _prefix + 'show-field-thumbnail' + '"]' );
|
495 |
|
@@ -516,7 +546,15 @@
|
|
516 |
* @param {type} layout_format
|
517 |
* @returns {undefined}
|
518 |
*/
|
519 |
-
var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
520 |
var expect_val = [ 'scrollable' ];
|
521 |
|
522 |
// Add more layouts
|
@@ -533,14 +571,12 @@
|
|
533 |
}
|
534 |
};
|
535 |
|
536 |
-
var view_type = '[name="' + _prefix + 'view-type' + '"]';
|
537 |
-
|
538 |
// Run on page load
|
539 |
-
fn_layout_format(
|
540 |
|
541 |
// Run on change
|
542 |
$( view_type ).change( function () {
|
543 |
-
fn_layout_format(
|
544 |
} );
|
545 |
},
|
546 |
/**
|
@@ -548,9 +584,7 @@
|
|
548 |
* @returns {undefined}
|
549 |
*/
|
550 |
_preview_btn_toggle: function () {
|
551 |
-
|
552 |
var $self = this;
|
553 |
-
var _prefix = $self.options._prefix;
|
554 |
|
555 |
var _fn = function ( is_trigger ) {
|
556 |
if ( !is_trigger ) {
|
@@ -572,36 +606,6 @@
|
|
572 |
_fn();
|
573 |
} );
|
574 |
},
|
575 |
-
/**
|
576 |
-
* Do handy toggle for Excerpt settings
|
577 |
-
*
|
578 |
-
* @returns {undefined}
|
579 |
-
*/
|
580 |
-
multi_level_toggle: function () {
|
581 |
-
var _prefix = this.options._prefix;
|
582 |
-
|
583 |
-
// For Excerpt Settings
|
584 |
-
var _this_toggle = function ( show_content ) {
|
585 |
-
if ( !show_content ) {
|
586 |
-
$( '#' + _prefix + 'group-excerpt-settings' ).addClass( 'hidden' );
|
587 |
-
} else {
|
588 |
-
$( '#' + _prefix + 'group-excerpt-settings' ).removeClass( 'hidden' );
|
589 |
-
}
|
590 |
-
};
|
591 |
-
|
592 |
-
var selector = '[name="' + _prefix + 'show-field-content' + '"]';
|
593 |
-
|
594 |
-
// Run on page load
|
595 |
-
_this_toggle( $( selector ).is( ':checked' ) );
|
596 |
-
|
597 |
-
// Run on change
|
598 |
-
$( selector ).change( function () {
|
599 |
-
_this_toggle( $( selector ).is( ':checked' ) );
|
600 |
-
} );
|
601 |
-
|
602 |
-
// Handy do other toggle
|
603 |
-
$( '.pt-wrap' ).trigger( _prefix + 'multi-level-toggle' );
|
604 |
-
},
|
605 |
/**
|
606 |
* Validate number: prevent negative value
|
607 |
* @returns {undefined}
|
@@ -612,75 +616,7 @@
|
|
612 |
if ( min == 0 && !( event.charCode >= 48 && event.charCode <= 57 ) )
|
613 |
event.preventDefault();
|
614 |
} );
|
615 |
-
},
|
616 |
-
/**
|
617 |
-
* Custom js for elements
|
618 |
-
* @returns {undefined}
|
619 |
-
*/
|
620 |
-
custom: function () {
|
621 |
-
var $self = this;
|
622 |
-
var _prefix = $self.options._prefix;
|
623 |
-
|
624 |
-
$self._preview_btn_toggle();
|
625 |
-
|
626 |
-
// Custom JS for Content Type
|
627 |
-
$self._content_type();
|
628 |
-
|
629 |
-
// Toggle Taxonomy Relation
|
630 |
-
$self._toggle_taxonomy_relation();
|
631 |
-
|
632 |
-
// Toggle panel of 'Advanced filters'
|
633 |
-
$self._toggle_panel( '.' + _prefix + 'group .panel-heading' );
|
634 |
-
|
635 |
-
// 'Thumbnail settings' toggle
|
636 |
-
$self._thumbnail_settings();
|
637 |
-
|
638 |
-
// Select 2
|
639 |
-
$( 'select.' + _prefix + 'select2' ).select2();
|
640 |
-
|
641 |
-
// Change class of panel inside panel
|
642 |
-
$( '.' + _prefix + 'group .panel .panel' ).each( function () {
|
643 |
-
$( this ).removeClass( 'panel-primary' ).addClass( 'panel-info' );
|
644 |
-
} );
|
645 |
-
|
646 |
-
// Set custom style for 'Thumbnail position' box
|
647 |
-
$( '.' + _prefix + 'bg-none' ).parent().css( { 'background-color': '#fff', 'padding-bottom': '10px' } );
|
648 |
-
$( '.' + _prefix + 'bg-none' ).parent().addClass( 'unsortable' );
|
649 |
-
|
650 |
-
// Prevent click on links
|
651 |
-
$( '#' + _prefix + 'preview-box' ).on( 'click', 'a', function ( e ) {
|
652 |
-
e.preventDefault();
|
653 |
-
} );
|
654 |
-
|
655 |
-
// Handle Pagination actions
|
656 |
-
$( 'body' ).bind( _prefix + 'admin-preview', function () {
|
657 |
-
new $.PT_CV_Public( { _prefix: _prefix } );
|
658 |
-
} );
|
659 |
-
|
660 |
-
// Prevent missing changes
|
661 |
-
var checked = 0;
|
662 |
-
$( '#' + _prefix + 'form-view input[type="submit"]' + ',' + 'a[href*="action=duplicate"]' ).click( function () {
|
663 |
-
checked = 1;
|
664 |
-
} );
|
665 |
-
window.onbeforeunload = function ( event ) {
|
666 |
-
if ( !$self.options.onload && !checked ) {
|
667 |
-
var message = 'The changes you made will be lost if you navigate away from this page.';
|
668 |
-
if ( typeof event === 'undefined' ) {
|
669 |
-
event = window.event;
|
670 |
-
}
|
671 |
-
if ( event ) {
|
672 |
-
event.returnValue = message;
|
673 |
-
}
|
674 |
-
return message;
|
675 |
-
}
|
676 |
-
};
|
677 |
-
|
678 |
-
// Validate number
|
679 |
-
$self.validate_number();
|
680 |
-
|
681 |
-
$( '.pt-accordion-a' ).click( function ( e ) {
|
682 |
-
e.preventDefault();
|
683 |
-
} );
|
684 |
}
|
685 |
};
|
|
|
686 |
}( jQuery ) );
|
14 |
$.PT_CV_Admin = $.PT_CV_Admin || { };
|
15 |
PT_CV_ADMIN = PT_CV_ADMIN || { };
|
16 |
ajaxurl = ajaxurl || { };
|
17 |
+
var _prefix = PT_CV_ADMIN._prefix;
|
18 |
|
19 |
$.PT_CV_Admin = function ( options ) {
|
20 |
+
this.options = $.extend( {
|
21 |
+
onload: 1,
|
22 |
+
scroll_time: 500,
|
23 |
+
can_preview: 1
|
24 |
+
}, options );
|
25 |
+
|
26 |
+
this.init();
|
27 |
};
|
28 |
|
29 |
$.PT_CV_Admin.prototype = {
|
30 |
+
init: function () {
|
31 |
+
this.custom();
|
32 |
+
|
33 |
+
// Validate number
|
34 |
+
this.validate_number();
|
35 |
+
// Select2
|
36 |
+
$( 'select.' + _prefix + 'select2' ).select2();
|
37 |
+
|
38 |
+
},
|
39 |
+
custom: function () {
|
40 |
+
var $self = this;
|
41 |
+
|
42 |
+
this.preview();
|
43 |
+
|
44 |
+
// 'Advance Settings'
|
45 |
+
this.toggle_group( '.' + _prefix + 'advanced-settings-item' );
|
46 |
+
// 'Terms' (in "Taxonomy Settings")
|
47 |
+
this.toggle_group( '.' + _prefix + 'taxonomy-item' );
|
48 |
+
// 'Content type'
|
49 |
+
this.toggle_group( '[name="' + _prefix + 'content-type' + '"]', false );
|
50 |
+
// 'View type settings'
|
51 |
+
this.toggle_group( '[name="' + _prefix + 'view-type' + '"]', false );
|
52 |
+
// Toggle dependencies
|
53 |
+
this.dependence_do_all();
|
54 |
+
// Toggle panel
|
55 |
+
this._toggle_panel( '.' + _prefix + 'group .panel-heading' );
|
56 |
+
|
57 |
+
this._preview_btn_toggle();
|
58 |
+
this._content_type();
|
59 |
+
this._toggle_taxonomy_relation();
|
60 |
+
this._thumbnail_settings();
|
61 |
+
|
62 |
+
// Prevent click on links
|
63 |
+
$( '#' + _prefix + 'preview-box' ).on( 'click', 'a', function ( e ) {
|
64 |
+
e.preventDefault();
|
65 |
+
} );
|
66 |
+
$( '.pt-accordion-a' ).click( function ( e ) {
|
67 |
+
e.preventDefault();
|
68 |
+
} );
|
69 |
+
|
70 |
+
// Show alert when leave page without saving View
|
71 |
+
var checked = 0;
|
72 |
+
$( '#' + _prefix + 'form-view input[type="submit"]' + ',' + 'a[href*="action=duplicate"]' ).click( function () {
|
73 |
+
checked = 1;
|
74 |
+
} );
|
75 |
+
window.onbeforeunload = function ( event ) {
|
76 |
+
if ( !$self.options.onload && !checked ) {
|
77 |
+
var message = 'The changes you made will be lost if you navigate away from this page.';
|
78 |
+
if ( typeof event === 'undefined' ) {
|
79 |
+
event = window.event;
|
80 |
+
}
|
81 |
+
if ( event ) {
|
82 |
+
event.returnValue = message;
|
83 |
+
}
|
84 |
+
return message;
|
85 |
+
}
|
86 |
+
};
|
87 |
+
|
88 |
+
// Handle Pagination actions
|
89 |
+
$( 'body' ).bind( _prefix + 'admin-preview', function () {
|
90 |
+
new $.PT_CV_Public( { _prefix: _prefix } );
|
91 |
+
} );
|
92 |
+
},
|
93 |
/**
|
94 |
* Toggle panel when click Show/Hide icon on Heading
|
95 |
*
|
120 |
*/
|
121 |
_toggle_taxonomy_relation: function () {
|
122 |
var $self = this;
|
123 |
+
$self._do_toggle_taxonomy_relation();
|
124 |
+
$( '.' + _prefix + 'taxonomy-item' ).change( function () {
|
125 |
+
$self._do_toggle_taxonomy_relation();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
} );
|
127 |
},
|
128 |
/**
|
129 |
* Toggle Taxonomy Relation setting by number of selected taxonomies
|
130 |
*
|
|
|
|
|
131 |
* @returns {undefined}
|
132 |
*/
|
133 |
+
_do_toggle_taxonomy_relation: function () {
|
134 |
+
var $taxonomy_relation = $( '.' + _prefix + 'taxonomy-relation' ).parent().parent( '.form-group' );
|
135 |
+
var $wrap_taxonomies = $( '#' + _prefix + 'group-taxonomy' );
|
136 |
|
137 |
// If there is no taxonomies
|
138 |
if ( $wrap_taxonomies.find( '.' + _prefix + 'taxonomies .checkbox' ).filter( function () {
|
139 |
return !$( this ).hasClass( 'hidden' ) && $( this ).find( 'input:checked' ).length;
|
140 |
} ).length > 1 ) {
|
141 |
$taxonomy_relation.removeClass( 'hidden' );
|
|
|
142 |
} else {
|
143 |
$taxonomy_relation.addClass( 'hidden' );
|
|
|
144 |
}
|
145 |
},
|
146 |
/**
|
162 |
/**
|
163 |
* Do toggle all dependency groups
|
164 |
*
|
|
|
165 |
* @returns {undefined}
|
166 |
*/
|
167 |
+
dependence_do_all: function () {
|
168 |
var $self = this;
|
169 |
+
var $toggle_data_js = $.parseJSON( $self.options._toggle_data );
|
170 |
+
|
171 |
$.each( $toggle_data_js, function ( idx, obj ) {
|
172 |
// Obj_sub: an object contains (dependence_id, operator, expect_val)
|
173 |
$.each( obj, function ( key, obj_sub ) {
|
208 |
* @returns {undefined}
|
209 |
*/
|
210 |
_dependence_element: function ( dependence_id, this_val, operator, expect_val ) {
|
|
|
211 |
var dependence_el = $( "#" + dependence_id );
|
212 |
var pass = 0;
|
213 |
switch ( operator ) {
|
253 |
* Toggle a group inside Panel group when check/uncheck a checkbox inside checboxes list
|
254 |
*
|
255 |
* @param {type} selector
|
256 |
+
* @param {type} toggle
|
257 |
* @returns {undefined}
|
258 |
*/
|
259 |
+
toggle_group: function ( selector, toggle ) {
|
260 |
var $self = this;
|
261 |
// Run on page load
|
262 |
$( selector ).each( function () {
|
263 |
+
$self._toggle_each_group( $( this ), toggle );
|
264 |
} );
|
265 |
// Run on change
|
266 |
$( selector ).each( function () {
|
267 |
$( this ).change( function () {
|
268 |
var this_ = $( this );
|
269 |
setTimeout( function () {
|
270 |
+
$self._toggle_each_group( this_, toggle );
|
271 |
}, 200 );
|
272 |
} );
|
273 |
} );
|
276 |
* Toggle group depends on selector value
|
277 |
*
|
278 |
* @param {type} $this
|
279 |
+
* @param {type} toggle
|
280 |
* @returns {undefined}
|
281 |
*/
|
282 |
+
_toggle_each_group: function ( $this, toggle ) {
|
283 |
var $self = this;
|
|
|
284 |
if ( $this.is( 'select' ) || ( ( $this.is( ':checkbox' ) || $this.is( ':radio' ) ) && $this.is( ':checked' ) ) ) {
|
285 |
// Get id of element A which needs to toggle
|
286 |
+
var toggle_id = '#' + PT_CV_ADMIN._group_prefix + $this.val();
|
287 |
|
288 |
// Get siblings groups of A
|
289 |
var other_groups = $( toggle_id ).parent().children( '.' + _prefix + 'group' ).not( toggle_id );
|
317 |
}, 2000 );
|
318 |
|
319 |
} else {
|
320 |
+
$( '#' + PT_CV_ADMIN._group_prefix + $this.val() ).addClass( 'hidden' );
|
321 |
}
|
322 |
},
|
323 |
/**
|
327 |
*/
|
328 |
_content_type: function () {
|
329 |
var $self = this;
|
|
|
|
|
330 |
var $wrap_taxonomies = $( '#' + _prefix + 'group-taxonomy' );
|
331 |
+
var $taxonomy_other_settings = $( '.' + _prefix + 'taxonomy-extra' );
|
332 |
var $taxonomies = $( '.' + _prefix + 'taxonomy-item' );
|
333 |
|
334 |
var $no_taxonomy = $( '<div/>', {
|
335 |
'id': _prefix + 'no-taxonomy',
|
336 |
'class': _prefix + 'text',
|
337 |
+
'text': PT_CV_ADMIN.text.no_taxonomy
|
338 |
+
} ).appendTo( $( '.' + _prefix + 'taxonomies' ) );
|
339 |
|
|
|
340 |
var fn_taxonomy_hide = function ( taxonomies ) {
|
341 |
+
// Hide all taxonomy checkboxes
|
342 |
taxonomies.each( function () {
|
343 |
$( this ).parents( '.checkbox' ).addClass( 'hidden' );
|
344 |
} );
|
345 |
|
|
|
346 |
$no_taxonomy.addClass( 'hidden' );
|
|
|
|
|
347 |
|
348 |
+
// Hide all sections of taxonomies
|
349 |
$( '.panel-group.terms' ).find( '.' + _prefix + 'group' ).addClass( 'hidden' );
|
350 |
};
|
351 |
|
352 |
// Run on page load
|
353 |
fn_taxonomy_hide( $taxonomies );
|
354 |
|
355 |
+
// For content type
|
356 |
+
var content_type = '[name="' + _prefix + 'content-type' + '"]';
|
357 |
+
var fn_content_type = function ( is_change ) {
|
358 |
+
var this_val;
|
359 |
+
if ( $( content_type ).is( 'input:radio' ) ) {
|
360 |
+
this_val = $( content_type + ':checked' ).val();
|
361 |
+
} else {
|
362 |
+
this_val = $( content_type ).val();
|
363 |
+
}
|
364 |
+
|
365 |
if ( typeof this_val === 'undefined' ) {
|
366 |
return;
|
367 |
}
|
371 |
$taxonomies.attr( 'checked', false );
|
372 |
|
373 |
// Toggle Taxonomy Relation setting
|
374 |
+
$self._do_toggle_taxonomy_relation();
|
|
|
375 |
}
|
376 |
|
377 |
+
// Show taxonomies of selected post type
|
378 |
if ( this_val !== '' ) {
|
379 |
fn_taxonomy_hide( $taxonomies );
|
380 |
|
385 |
} ).parents( '.checkbox' ).removeClass( 'hidden' );
|
386 |
}
|
387 |
|
388 |
+
// Show message "there is no taxonomy"
|
389 |
if ( $wrap_taxonomies.find( '.' + _prefix + 'taxonomies .checkbox' ).filter( function () {
|
390 |
return !$( this ).hasClass( 'hidden' );
|
391 |
} ).length === 0 ) {
|
|
|
392 |
$no_taxonomy.removeClass( 'hidden' );
|
|
|
393 |
$taxonomy_other_settings.addClass( 'hidden' );
|
394 |
}
|
395 |
|
397 |
$( '.pt-wrap' ).trigger( 'content-type-change', [ this_val ] );
|
398 |
};
|
399 |
|
|
|
|
|
400 |
// Run on page load
|
401 |
+
fn_content_type();
|
402 |
|
403 |
// Run on change
|
404 |
$( content_type ).change( function () {
|
405 |
+
fn_content_type( 1 );
|
406 |
} );
|
407 |
},
|
408 |
/**
|
409 |
* Preview handle
|
410 |
*
|
|
|
411 |
* @returns {undefined}
|
412 |
*/
|
413 |
+
preview: function () {
|
414 |
var $self = this;
|
|
|
|
|
|
|
415 |
var offset_top;
|
416 |
|
417 |
$( '#' + _prefix + 'show-preview' ).click( function ( e ) {
|
453 |
// Get settings data
|
454 |
var data = $( '#' + _prefix + 'form-view' ).serialize();
|
455 |
// Call handle function
|
456 |
+
$self._preview_request( $preview, data, $this_btn );
|
457 |
} else {
|
458 |
// Scroll to previous position
|
459 |
$( 'html, body' ).animate( {
|
475 |
*
|
476 |
* @param {object} preview_box The jqurey object
|
477 |
* @param {string} _data
|
|
|
478 |
* @param {object} $this_btn The Show/Hide preview button
|
479 |
* @returns void
|
480 |
*/
|
481 |
+
_preview_request: function ( preview_box, _data, $this_btn ) {
|
482 |
var $self = this;
|
|
|
|
|
|
|
483 |
var data = {
|
484 |
action: 'preview_request',
|
485 |
data: _data,
|
486 |
+
ajax_nonce: PT_CV_ADMIN._nonce
|
487 |
};
|
488 |
|
489 |
// Sent POST request
|
519 |
* @returns {undefined}
|
520 |
*/
|
521 |
_thumbnail_settings: function () {
|
522 |
+
// Toggle 'Thumbnail settings' when change 'Layout format'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
523 |
var fn_thumbnail_setting = function ( this_val ) {
|
524 |
var $show_thumbnail = $( '[name="' + _prefix + 'show-field-thumbnail' + '"]' );
|
525 |
|
546 |
* @param {type} layout_format
|
547 |
* @returns {undefined}
|
548 |
*/
|
549 |
+
var view_type = '[name="' + _prefix + 'view-type' + '"]';
|
550 |
+
var fn_layout_format = function ( layout_format ) {
|
551 |
+
var this_val;
|
552 |
+
if ( $( view_type ).is( 'input:radio' ) ) {
|
553 |
+
this_val = $( view_type + ':checked' ).val();
|
554 |
+
} else {
|
555 |
+
this_val = $( view_type ).val();
|
556 |
+
}
|
557 |
+
|
558 |
var expect_val = [ 'scrollable' ];
|
559 |
|
560 |
// Add more layouts
|
571 |
}
|
572 |
};
|
573 |
|
|
|
|
|
574 |
// Run on page load
|
575 |
+
fn_layout_format( layout_format );
|
576 |
|
577 |
// Run on change
|
578 |
$( view_type ).change( function () {
|
579 |
+
fn_layout_format( layout_format );
|
580 |
} );
|
581 |
},
|
582 |
/**
|
584 |
* @returns {undefined}
|
585 |
*/
|
586 |
_preview_btn_toggle: function () {
|
|
|
587 |
var $self = this;
|
|
|
588 |
|
589 |
var _fn = function ( is_trigger ) {
|
590 |
if ( !is_trigger ) {
|
606 |
_fn();
|
607 |
} );
|
608 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
609 |
/**
|
610 |
* Validate number: prevent negative value
|
611 |
* @returns {undefined}
|
616 |
if ( min == 0 && !( event.charCode >= 48 && event.charCode <= 57 ) )
|
617 |
event.preventDefault();
|
618 |
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
619 |
}
|
620 |
};
|
621 |
+
|
622 |
}( jQuery ) );
|
admin/content-views-admin.php
CHANGED
@@ -213,17 +213,20 @@ class PT_Content_Views_Admin {
|
|
213 |
// Localize strings
|
214 |
PT_CV_Asset::localize_script(
|
215 |
'admin', PT_CV_PREFIX_UPPER . 'ADMIN', array(
|
|
|
|
|
|
|
216 |
'supported_version' => PT_CV_Functions::wp_version_compare( '3.5' ),
|
217 |
'text' => array(
|
218 |
-
'no_taxonomy' => __( 'There is no taxonomy for selected content type',
|
219 |
-
'pagination_disable' => __( 'Pagination is disabled when Limit = -1',
|
220 |
-
'prevent_click' => __( 'Opening a link is prevented in preview box',
|
221 |
),
|
222 |
'btn' => array(
|
223 |
'preview' => array(
|
224 |
-
'show' => __( 'Show Preview',
|
225 |
-
'hide' => __( 'Hide Preview',
|
226 |
-
'update' => __( 'Update Preview',
|
227 |
),
|
228 |
),
|
229 |
'data' => array(
|
@@ -290,19 +293,19 @@ class PT_Content_Views_Admin {
|
|
290 |
$user_role = current_user_can( 'administrator' ) ? 'administrator' : PT_CV_Functions::get_option_value( 'access_role', 'administrator' );
|
291 |
|
292 |
$this->plugin_screen_hook_suffix = add_menu_page(
|
293 |
-
__( 'Content Views Settings',
|
294 |
);
|
295 |
|
296 |
$this->plugin_sub_screen_hook_suffix[] = PT_CV_Functions::menu_add_sub(
|
297 |
-
$this->plugin_slug, __( 'All
|
298 |
);
|
299 |
|
300 |
$this->plugin_sub_screen_hook_suffix[] = PT_CV_Functions::menu_add_sub(
|
301 |
-
$this->plugin_slug, __( 'Add New View',
|
302 |
);
|
303 |
|
304 |
$this->plugin_sub_screen_hook_suffix[] = add_submenu_page(
|
305 |
-
$this->plugin_slug, __( 'Content Views Settings',
|
306 |
);
|
307 |
|
308 |
global $submenu;
|
@@ -355,8 +358,8 @@ class PT_Content_Views_Admin {
|
|
355 |
|
356 |
return array_merge(
|
357 |
array(
|
358 |
-
'settings' => '<a href="' . admin_url( 'admin.php?page=' . $this->plugin_slug ) . '">' . __( 'Settings'
|
359 |
-
'add' => '<a href="' . admin_url( 'admin.php?page=' . $this->plugin_slug . '-add' ) . '">' .
|
360 |
), $links
|
361 |
);
|
362 |
}
|
@@ -390,7 +393,7 @@ class PT_Content_Views_Admin {
|
|
390 |
|
391 |
if ( !empty( $view_id ) ) {
|
392 |
$edit_link = PT_CV_Functions::view_link( $view_id );
|
393 |
-
$actions[ 'edit' ] = '<a href="' . esc_url( $edit_link ) . '"
|
394 |
}
|
395 |
|
396 |
// Filter actions
|
@@ -452,7 +455,7 @@ class PT_Content_Views_Admin {
|
|
452 |
if ( $this->plugin_screen_hook_suffix == $screen->id || in_array( $screen->id, $this->plugin_sub_screen_hook_suffix ) ) {
|
453 |
// If View id is passed in url
|
454 |
if ( !empty( $_GET[ 'id' ] ) ) {
|
455 |
-
$admin_title = str_replace( 'Add New', 'Edit', $admin_title );
|
456 |
}
|
457 |
}
|
458 |
|
213 |
// Localize strings
|
214 |
PT_CV_Asset::localize_script(
|
215 |
'admin', PT_CV_PREFIX_UPPER . 'ADMIN', array(
|
216 |
+
'_prefix' => PT_CV_PREFIX,
|
217 |
+
'_group_prefix' => PT_CV_Html::html_group_class() . '-',
|
218 |
+
'_nonce' => wp_create_nonce( PT_CV_PREFIX_ . 'ajax_nonce' ),
|
219 |
'supported_version' => PT_CV_Functions::wp_version_compare( '3.5' ),
|
220 |
'text' => array(
|
221 |
+
'no_taxonomy' => __( 'There is no taxonomy for selected content type', 'content-views-query-and-display-post-page' ),
|
222 |
+
'pagination_disable' => __( 'Pagination is disabled when Limit = -1', 'content-views-query-and-display-post-page' ),
|
223 |
+
'prevent_click' => __( 'Opening a link is prevented in preview box', 'content-views-query-and-display-post-page' ),
|
224 |
),
|
225 |
'btn' => array(
|
226 |
'preview' => array(
|
227 |
+
'show' => __( 'Show Preview', 'content-views-query-and-display-post-page' ),
|
228 |
+
'hide' => __( 'Hide Preview', 'content-views-query-and-display-post-page' ),
|
229 |
+
'update' => __( 'Update Preview', 'content-views-query-and-display-post-page' ),
|
230 |
),
|
231 |
),
|
232 |
'data' => array(
|
293 |
$user_role = current_user_can( 'administrator' ) ? 'administrator' : PT_CV_Functions::get_option_value( 'access_role', 'administrator' );
|
294 |
|
295 |
$this->plugin_screen_hook_suffix = add_menu_page(
|
296 |
+
__( 'Content Views Settings', 'content-views-query-and-display-post-page' ), __( 'Content Views', 'content-views-query-and-display-post-page' ), $user_role, $this->plugin_slug, array( $this, 'display_plugin_admin_page' ), '', '45.6'
|
297 |
);
|
298 |
|
299 |
$this->plugin_sub_screen_hook_suffix[] = PT_CV_Functions::menu_add_sub(
|
300 |
+
$this->plugin_slug, __( 'All Views', 'content-views-query-and-display-post-page' ), __( 'All Views', 'content-views-query-and-display-post-page' ), $user_role, 'list', __CLASS__
|
301 |
);
|
302 |
|
303 |
$this->plugin_sub_screen_hook_suffix[] = PT_CV_Functions::menu_add_sub(
|
304 |
+
$this->plugin_slug, __( 'Add New View', 'content-views-query-and-display-post-page' ), _x( 'Add New', 'post' ), $user_role, 'add', __CLASS__
|
305 |
);
|
306 |
|
307 |
$this->plugin_sub_screen_hook_suffix[] = add_submenu_page(
|
308 |
+
$this->plugin_slug, __( 'Content Views Settings', 'content-views-query-and-display-post-page' ), __( 'Settings' ), $user_role, $this->plugin_slug, array( $this, 'display_plugin_admin_page' )
|
309 |
);
|
310 |
|
311 |
global $submenu;
|
358 |
|
359 |
return array_merge(
|
360 |
array(
|
361 |
+
'settings' => '<a href="' . admin_url( 'admin.php?page=' . $this->plugin_slug ) . '">' . __( 'Settings' ) . '</a>',
|
362 |
+
'add' => '<a href="' . admin_url( 'admin.php?page=' . $this->plugin_slug . '-add' ) . '">' . _x( 'Add New', 'post' ) . '</a>',
|
363 |
), $links
|
364 |
);
|
365 |
}
|
393 |
|
394 |
if ( !empty( $view_id ) ) {
|
395 |
$edit_link = PT_CV_Functions::view_link( $view_id );
|
396 |
+
$actions[ 'edit' ] = '<a href="' . esc_url( $edit_link ) . '">' . __( 'Edit' ) . '</a>';
|
397 |
}
|
398 |
|
399 |
// Filter actions
|
455 |
if ( $this->plugin_screen_hook_suffix == $screen->id || in_array( $screen->id, $this->plugin_sub_screen_hook_suffix ) ) {
|
456 |
// If View id is passed in url
|
457 |
if ( !empty( $_GET[ 'id' ] ) ) {
|
458 |
+
$admin_title = str_replace( _x( 'Add New', 'post' ), __( 'Edit' ), $admin_title );
|
459 |
}
|
460 |
}
|
461 |
|
admin/includes/options.php
CHANGED
@@ -122,7 +122,7 @@ if ( !class_exists( 'PT_Options_Framework' ) ) {
|
|
122 |
$for = isset( $label[ 'for' ] ) ? "for='{$label[ 'for' ]}'" : '';
|
123 |
$width = 12 - ( isset( $extra_setting[ 'params' ][ 'width' ] ) ? intval( $extra_setting[ 'params' ][ 'width' ] ) : 10 );
|
124 |
if ( $width ) {
|
125 |
-
$html = "<label $for class='col-md-$width control-label'>" .
|
126 |
} else {
|
127 |
$html = '';
|
128 |
}
|
@@ -354,10 +354,13 @@ if ( !class_exists( 'PT_Options_Framework' ) ) {
|
|
354 |
$id = PT_CV_Html::html_group_id( $key );
|
355 |
|
356 |
if ( !isset( $settings[ 'no_panel' ] ) ) {
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
|
|
|
|
|
|
361 |
} else {
|
362 |
$html = $content;
|
363 |
}
|
@@ -366,39 +369,16 @@ if ( !class_exists( 'PT_Options_Framework' ) ) {
|
|
366 |
}
|
367 |
|
368 |
/**
|
369 |
-
*
|
370 |
*/
|
371 |
public static function print_js() {
|
372 |
-
$toggle_data_js = json_encode( self::$dependence_info );
|
373 |
?>
|
374 |
<script>
|
375 |
( function ( $ ) {
|
376 |
"use strict";
|
377 |
|
378 |
$( function () {
|
379 |
-
|
380 |
-
var $pt_cv_admin_js = new $.PT_CV_Admin( { _prefix: _prefix } );
|
381 |
-
var group_prefix = '<?php echo esc_js( PT_CV_Html::html_group_class() ); ?>' + '-';
|
382 |
-
|
383 |
-
// Preview actions
|
384 |
-
$pt_cv_admin_js.preview( '<?php echo wp_create_nonce( PT_CV_PREFIX_ . 'ajax_nonce' ); ?>' );
|
385 |
-
|
386 |
-
// Custom js
|
387 |
-
$pt_cv_admin_js.custom();
|
388 |
-
|
389 |
-
// Toggle Panel group of 'Advance Settings'
|
390 |
-
$pt_cv_admin_js.toggle_group( '.' + _prefix + 'advanced-settings-item', group_prefix );
|
391 |
-
// Toggle Panel group of 'Terms' (in "Taxonomy Settings")
|
392 |
-
$pt_cv_admin_js.toggle_group( '.' + _prefix + 'taxonomy-item', group_prefix );
|
393 |
-
// Toggle Panel group of 'Content type'
|
394 |
-
$pt_cv_admin_js.toggle_group( '[name="' + _prefix + 'content-type' + '"]', group_prefix, false );
|
395 |
-
// Toggle Panel group of 'View type settings'
|
396 |
-
$pt_cv_admin_js.toggle_group( '[name="' + _prefix + 'view-type' + '"]', group_prefix, false );
|
397 |
-
|
398 |
-
// Toggle dependence
|
399 |
-
$pt_cv_admin_js.dependence_do_all( '<?php echo $toggle_data_js; ?>' );
|
400 |
-
|
401 |
-
$pt_cv_admin_js.multi_level_toggle();
|
402 |
} );
|
403 |
}( jQuery ) );
|
404 |
</script>
|
122 |
$for = isset( $label[ 'for' ] ) ? "for='{$label[ 'for' ]}'" : '';
|
123 |
$width = 12 - ( isset( $extra_setting[ 'params' ][ 'width' ] ) ? intval( $extra_setting[ 'params' ][ 'width' ] ) : 10 );
|
124 |
if ( $width ) {
|
125 |
+
$html = "<label $for class='col-md-$width control-label'>" . $label[ 'text' ] . '</label>';
|
126 |
} else {
|
127 |
$html = '';
|
128 |
}
|
354 |
$id = PT_CV_Html::html_group_id( $key );
|
355 |
|
356 |
if ( !isset( $settings[ 'no_panel' ] ) ) {
|
357 |
+
if ( !empty( $param_group[ 'parent_label' ] ) ) {
|
358 |
+
$heading = $param_group[ 'parent_label' ];
|
359 |
+
} else {
|
360 |
+
$heading = isset( $settings[ 'nice_name' ][ $key ] ) ? $settings[ 'nice_name' ][ $key ] : PT_CV_Functions::string_slug_to_text( $key );
|
361 |
+
}
|
362 |
+
|
363 |
+
$html = PT_CV_Html::html_collapse_one( $parent_id, $id . '-child', $heading, $content, true );
|
364 |
} else {
|
365 |
$html = $content;
|
366 |
}
|
369 |
}
|
370 |
|
371 |
/**
|
372 |
+
* Start Admin JS with dependency data
|
373 |
*/
|
374 |
public static function print_js() {
|
|
|
375 |
?>
|
376 |
<script>
|
377 |
( function ( $ ) {
|
378 |
"use strict";
|
379 |
|
380 |
$( function () {
|
381 |
+
new $.PT_CV_Admin( { _toggle_data: '<?php echo json_encode( self::$dependence_info ); ?>' } );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
382 |
} );
|
383 |
}( jQuery ) );
|
384 |
</script>
|
admin/views/view.php
CHANGED
@@ -33,7 +33,7 @@ PT_CV_Functions::view_submit();
|
|
33 |
<div class="wrap form-horizontal pt-wrap">
|
34 |
<?php do_action( PT_CV_PREFIX_ . 'admin_view_header' ); ?>
|
35 |
|
36 |
-
<h2><?php echo esc_html( $id ? __( 'Edit View',
|
37 |
|
38 |
<?php
|
39 |
if ( $id ) {
|
@@ -54,14 +54,14 @@ PT_CV_Functions::view_submit();
|
|
54 |
$options = array(
|
55 |
array(
|
56 |
'label' => array(
|
57 |
-
'text' => __( 'Preview'
|
58 |
),
|
59 |
'params' => array(
|
60 |
array(
|
61 |
'type' => 'html',
|
62 |
'name' => 'preview',
|
63 |
'content' => PT_CV_Html::html_preview_box(),
|
64 |
-
'desc' => __( 'To
|
65 |
),
|
66 |
),
|
67 |
),
|
@@ -71,7 +71,7 @@ PT_CV_Functions::view_submit();
|
|
71 |
</div>
|
72 |
|
73 |
<!-- Show Preview -->
|
74 |
-
<a class="btn btn-success" id="<?php echo esc_attr( PT_CV_PREFIX ); ?>show-preview"><?php _e( 'Show Preview',
|
75 |
|
76 |
<br>
|
77 |
|
@@ -96,14 +96,14 @@ PT_CV_Functions::view_submit();
|
|
96 |
$options = array(
|
97 |
array(
|
98 |
'label' => array(
|
99 |
-
'text' => __( '
|
100 |
),
|
101 |
'params' => array(
|
102 |
array(
|
103 |
'type' => 'text',
|
104 |
'name' => 'view-title',
|
105 |
'std' => isset( $view_object->post_title ) ? $view_object->post_title : '',
|
106 |
-
'desc' => __( 'Enter a name to identify your views easily',
|
107 |
),
|
108 |
),
|
109 |
),
|
@@ -114,18 +114,18 @@ PT_CV_Functions::view_submit();
|
|
114 |
|
115 |
<!-- Save -->
|
116 |
<div class="btn-cvp-action">
|
117 |
-
<input type="submit" class="btn btn-primary pull-right <?php echo esc_attr( PT_CV_PREFIX ); ?>save-view" value="<?php _e( 'Save'
|
118 |
<?php do_action( PT_CV_PREFIX_ . 'admin_more_buttons' ); ?>
|
119 |
</div>
|
120 |
|
121 |
<!-- Nav tabs -->
|
122 |
<ul class="nav nav-tabs">
|
123 |
<li class="active">
|
124 |
-
<a href="#<?php echo esc_attr( PT_CV_PREFIX ); ?>filter-settings" data-toggle="tab"><span class="glyphicon glyphicon-search"></span><?php _e( 'Filter Settings',
|
125 |
</a>
|
126 |
</li>
|
127 |
<li>
|
128 |
-
<a href="#<?php echo esc_attr( PT_CV_PREFIX ); ?>display-settings" data-toggle="tab"><span class="glyphicon glyphicon-th-large"></span><?php _e( 'Display Settings',
|
129 |
</a>
|
130 |
</li>
|
131 |
<?php do_action( PT_CV_PREFIX_ . 'setting_tabs_header', $settings ); ?>
|
@@ -140,24 +140,24 @@ PT_CV_Functions::view_submit();
|
|
140 |
// Content type
|
141 |
array(
|
142 |
'label' => array(
|
143 |
-
'text' => __( 'Content type',
|
144 |
),
|
145 |
'params' => array(
|
146 |
-
array(
|
147 |
'type' => 'radio',
|
148 |
'name' => 'content-type',
|
149 |
'options' => PT_CV_Values::post_types(),
|
150 |
'std' => 'post',
|
151 |
-
),
|
152 |
),
|
153 |
),
|
154 |
// Upgrade to Pro: Custom post type
|
155 |
-
!get_option( 'pt_cv_version_pro' ) ? PT_CV_Settings::get_cvpro( __( 'Filter custom post type (product, event...)',
|
156 |
apply_filters( PT_CV_PREFIX_ . 'custom_filters', array() ),
|
157 |
// Common Filters
|
158 |
array(
|
159 |
'label' => array(
|
160 |
-
'text' => __( 'Common filters',
|
161 |
),
|
162 |
'extra_setting' => array(
|
163 |
'params' => array(
|
@@ -172,14 +172,14 @@ PT_CV_Functions::view_submit();
|
|
172 |
// Includes
|
173 |
array(
|
174 |
'label' => array(
|
175 |
-
'text' => __( 'Include only',
|
176 |
),
|
177 |
'params' => array(
|
178 |
array(
|
179 |
'type' => 'text',
|
180 |
'name' => 'post__in',
|
181 |
'std' => '',
|
182 |
-
'desc' => apply_filters( PT_CV_PREFIX_ . 'setting_post_in', __( 'List of post IDs to show (comma-separated values, for example: 1,2,3)',
|
183 |
),
|
184 |
),
|
185 |
),
|
@@ -187,14 +187,14 @@ PT_CV_Functions::view_submit();
|
|
187 |
// Excludes
|
188 |
array(
|
189 |
'label' => array(
|
190 |
-
'text' => __( 'Exclude',
|
191 |
),
|
192 |
'params' => array(
|
193 |
array(
|
194 |
'type' => 'text',
|
195 |
'name' => 'post__not_in',
|
196 |
'std' => '',
|
197 |
-
'desc' => apply_filters( PT_CV_PREFIX_ . 'setting_post_not_in', __( 'List of post IDs to exclude (comma-separated values, for example: 1,2,3)',
|
198 |
),
|
199 |
),
|
200 |
'dependence' => array( 'post__in', '' ),
|
@@ -203,14 +203,14 @@ PT_CV_Functions::view_submit();
|
|
203 |
// Parent page
|
204 |
array(
|
205 |
'label' => array(
|
206 |
-
'text' => __( 'Parent page',
|
207 |
),
|
208 |
'params' => array(
|
209 |
array(
|
210 |
'type' => 'number',
|
211 |
'name' => 'post_parent',
|
212 |
'std' => '',
|
213 |
-
'desc' => apply_filters( PT_CV_PREFIX_ . 'setting_parent_page', __( 'Enter ID of parent page to show its children',
|
214 |
),
|
215 |
),
|
216 |
'dependence' => array( 'content-type', 'page' ),
|
@@ -219,7 +219,7 @@ PT_CV_Functions::view_submit();
|
|
219 |
// Limit
|
220 |
array(
|
221 |
'label' => array(
|
222 |
-
'text' => __( 'Limit',
|
223 |
),
|
224 |
'params' => array(
|
225 |
array(
|
@@ -227,12 +227,12 @@ PT_CV_Functions::view_submit();
|
|
227 |
'name' => 'limit',
|
228 |
'std' => '10',
|
229 |
'min' => '1',
|
230 |
-
'desc' => __( 'The number of posts to show. Set empty to show all found posts',
|
231 |
),
|
232 |
),
|
233 |
),
|
234 |
// Upgrade to Pro: Offset
|
235 |
-
apply_filters( PT_CV_PREFIX_ . 'after_limit_option', PT_CV_Settings::get_cvpro( __( 'Skip some posts',
|
236 |
),
|
237 |
),
|
238 |
),
|
@@ -240,7 +240,7 @@ PT_CV_Functions::view_submit();
|
|
240 |
// Advanced Filters
|
241 |
array(
|
242 |
'label' => array(
|
243 |
-
'text' => __( 'Advanced filters',
|
244 |
),
|
245 |
'extra_setting' => array(
|
246 |
'params' => array(
|
@@ -292,10 +292,11 @@ PT_CV_Functions::view_submit();
|
|
292 |
'params' => apply_filters( PT_CV_PREFIX_ . 'advanced_settings_panel', array(
|
293 |
// Taxonomies Settings
|
294 |
'taxonomy' => array(
|
|
|
295 |
// Taxonomies list
|
296 |
array(
|
297 |
'label' => array(
|
298 |
-
'text' => __( '
|
299 |
),
|
300 |
'extra_setting' => array(
|
301 |
'params' => array(
|
@@ -309,16 +310,15 @@ PT_CV_Functions::view_submit();
|
|
309 |
'options' => PT_CV_Values::taxonomy_list(),
|
310 |
'std' => '',
|
311 |
'class' => 'taxonomy-item',
|
312 |
-
'desc' => __( 'Check the boxes to show settings', PT_CV_TEXTDOMAIN ),
|
313 |
),
|
314 |
),
|
315 |
),
|
316 |
// Upgrade to Pro: Custom taxonomy
|
317 |
-
!get_option( 'pt_cv_version_pro' ) ? PT_CV_Settings::get_cvpro( __( 'Filter by custom taxonomies',
|
318 |
// Terms list
|
319 |
array(
|
320 |
'label' => array(
|
321 |
-
'text' =>
|
322 |
),
|
323 |
'extra_setting' => array(
|
324 |
'params' => array(
|
@@ -339,7 +339,7 @@ PT_CV_Functions::view_submit();
|
|
339 |
// Relation of taxonomies
|
340 |
array(
|
341 |
'label' => array(
|
342 |
-
'text' => __( 'Relation',
|
343 |
),
|
344 |
'params' => array(
|
345 |
array(
|
@@ -351,14 +351,15 @@ PT_CV_Functions::view_submit();
|
|
351 |
),
|
352 |
),
|
353 |
),
|
354 |
-
!get_option( 'pt_cv_version_pro' ) ? PT_CV_Settings::get_cvpro( sprintf( '<br>' . __( 'When you select any term above, it will not replace posts layout in term page (for example: %s) with layout of this View',
|
355 |
apply_filters( PT_CV_PREFIX_ . 'taxonomies_custom_settings', array() ),
|
356 |
), // End Taxonomies Settings
|
357 |
-
//
|
358 |
'order' => array(
|
|
|
359 |
array(
|
360 |
'label' => array(
|
361 |
-
'text' => __( '
|
362 |
),
|
363 |
'extra_setting' => array(
|
364 |
'params' => array(
|
@@ -378,9 +379,10 @@ PT_CV_Functions::view_submit();
|
|
378 |
), // End Order by Settings
|
379 |
// Author Settings
|
380 |
'author' => apply_filters( PT_CV_PREFIX_ . 'author_settings', array(
|
|
|
381 |
array(
|
382 |
'label' => array(
|
383 |
-
'text' => __( '
|
384 |
),
|
385 |
'params' => array(
|
386 |
array(
|
@@ -396,7 +398,7 @@ PT_CV_Functions::view_submit();
|
|
396 |
$version_gt_37 ?
|
397 |
array(
|
398 |
'label' => array(
|
399 |
-
'text' => __( 'Not
|
400 |
),
|
401 |
'params' => array(
|
402 |
array(
|
@@ -412,11 +414,17 @@ PT_CV_Functions::view_submit();
|
|
412 |
) ), // End Author Settings
|
413 |
// Status Settings
|
414 |
'status' => array(
|
|
|
415 |
array(
|
416 |
-
'label'
|
417 |
-
'text' =>
|
418 |
),
|
419 |
-
'
|
|
|
|
|
|
|
|
|
|
|
420 |
array(
|
421 |
'type' => 'select',
|
422 |
'name' => 'post_status',
|
@@ -424,22 +432,29 @@ PT_CV_Functions::view_submit();
|
|
424 |
'std' => 'publish',
|
425 |
'class' => 'select2',
|
426 |
'multiple' => '1',
|
|
|
427 |
),
|
428 |
),
|
429 |
),
|
430 |
), // End Status Settings
|
431 |
// Keyword Settings
|
432 |
'search' => array(
|
|
|
433 |
array(
|
434 |
-
'label'
|
435 |
-
'text' =>
|
436 |
),
|
437 |
-
'
|
|
|
|
|
|
|
|
|
|
|
438 |
array(
|
439 |
'type' => 'text',
|
440 |
'name' => 's',
|
441 |
'std' => '',
|
442 |
-
'desc' => __( 'Enter
|
443 |
),
|
444 |
),
|
445 |
),
|
@@ -462,21 +477,21 @@ PT_CV_Functions::view_submit();
|
|
462 |
// View Type
|
463 |
array(
|
464 |
'label' => array(
|
465 |
-
'text' => __( 'View type (Layout)',
|
466 |
),
|
467 |
'params' => array(
|
468 |
-
array(
|
469 |
'type' => 'radio',
|
470 |
'name' => 'view-type',
|
471 |
'options' => PT_CV_Values::view_type(),
|
472 |
'std' => PT_CV_Functions::array_get_first_key( PT_CV_Values::view_type() ),
|
473 |
-
),
|
474 |
),
|
475 |
),
|
476 |
// View settings
|
477 |
array(
|
478 |
'label' => array(
|
479 |
-
'text' =>
|
480 |
),
|
481 |
'params' => array(
|
482 |
array(
|
@@ -493,7 +508,7 @@ PT_CV_Functions::view_submit();
|
|
493 |
// Layout format of output item
|
494 |
array(
|
495 |
'label' => array(
|
496 |
-
'text' => __( 'Layout format',
|
497 |
),
|
498 |
'extra_setting' => array(
|
499 |
'params' => array(
|
@@ -535,7 +550,7 @@ PT_CV_Functions::view_submit();
|
|
535 |
array(
|
536 |
'type' => 'checkbox',
|
537 |
'name' => 'lf-mobile-disable',
|
538 |
-
'options' => PT_CV_Values::yes_no( 'yes', __( 'Disable this format on mobile devices & extra small screens',
|
539 |
'std' => '',
|
540 |
),
|
541 |
),
|
@@ -548,7 +563,7 @@ PT_CV_Functions::view_submit();
|
|
548 |
// Fields settings
|
549 |
array(
|
550 |
'label' => array(
|
551 |
-
'text' => __( 'Fields settings',
|
552 |
),
|
553 |
'extra_setting' => array(
|
554 |
'params' => array(
|
@@ -566,7 +581,7 @@ PT_CV_Functions::view_submit();
|
|
566 |
// Pagination settings
|
567 |
array(
|
568 |
'label' => array(
|
569 |
-
'text' => __( 'Pagination
|
570 |
),
|
571 |
'extra_setting' => array(
|
572 |
'params' => array(
|
@@ -583,7 +598,7 @@ PT_CV_Functions::view_submit();
|
|
583 |
// Other settings
|
584 |
array(
|
585 |
'label' => array(
|
586 |
-
'text' => __( '
|
587 |
),
|
588 |
'extra_setting' => array(
|
589 |
'params' => array(
|
@@ -614,6 +629,6 @@ PT_CV_Functions::view_submit();
|
|
614 |
<div class="clearfix"></div>
|
615 |
<hr>
|
616 |
<!-- Save -->
|
617 |
-
<input type="submit" class="btn btn-primary pull-right <?php echo esc_attr( PT_CV_PREFIX ); ?>save-view" value="<?php _e( 'Save'
|
618 |
</form>
|
619 |
</div>
|
33 |
<div class="wrap form-horizontal pt-wrap">
|
34 |
<?php do_action( PT_CV_PREFIX_ . 'admin_view_header' ); ?>
|
35 |
|
36 |
+
<h2><?php echo esc_html( $id ? __( 'Edit View', 'content-views-query-and-display-post-page' ) : get_admin_page_title() ); ?></h2>
|
37 |
|
38 |
<?php
|
39 |
if ( $id ) {
|
54 |
$options = array(
|
55 |
array(
|
56 |
'label' => array(
|
57 |
+
'text' => __( 'Preview' ),
|
58 |
),
|
59 |
'params' => array(
|
60 |
array(
|
61 |
'type' => 'html',
|
62 |
'name' => 'preview',
|
63 |
'content' => PT_CV_Html::html_preview_box(),
|
64 |
+
'desc' => sprintf( __( 'To see live output, please click %s button', 'content-views-query-and-display-post-page' ), sprintf( '<code>%s</code>', __( 'Show Preview', 'content-views-query-and-display-post-page' ) ) ),
|
65 |
),
|
66 |
),
|
67 |
),
|
71 |
</div>
|
72 |
|
73 |
<!-- Show Preview -->
|
74 |
+
<a class="btn btn-success" id="<?php echo esc_attr( PT_CV_PREFIX ); ?>show-preview"><?php _e( 'Show Preview', 'content-views-query-and-display-post-page' ); ?></a>
|
75 |
|
76 |
<br>
|
77 |
|
96 |
$options = array(
|
97 |
array(
|
98 |
'label' => array(
|
99 |
+
'text' => __( 'Title' ),
|
100 |
),
|
101 |
'params' => array(
|
102 |
array(
|
103 |
'type' => 'text',
|
104 |
'name' => 'view-title',
|
105 |
'std' => isset( $view_object->post_title ) ? $view_object->post_title : '',
|
106 |
+
'desc' => __( 'Enter a name to identify your views easily', 'content-views-query-and-display-post-page' ),
|
107 |
),
|
108 |
),
|
109 |
),
|
114 |
|
115 |
<!-- Save -->
|
116 |
<div class="btn-cvp-action">
|
117 |
+
<input type="submit" class="btn btn-primary pull-right <?php echo esc_attr( PT_CV_PREFIX ); ?>save-view" value="<?php _e( 'Save' ); ?>">
|
118 |
<?php do_action( PT_CV_PREFIX_ . 'admin_more_buttons' ); ?>
|
119 |
</div>
|
120 |
|
121 |
<!-- Nav tabs -->
|
122 |
<ul class="nav nav-tabs">
|
123 |
<li class="active">
|
124 |
+
<a href="#<?php echo esc_attr( PT_CV_PREFIX ); ?>filter-settings" data-toggle="tab"><span class="glyphicon glyphicon-search"></span><?php _e( 'Filter Settings', 'content-views-query-and-display-post-page' ); ?>
|
125 |
</a>
|
126 |
</li>
|
127 |
<li>
|
128 |
+
<a href="#<?php echo esc_attr( PT_CV_PREFIX ); ?>display-settings" data-toggle="tab"><span class="glyphicon glyphicon-th-large"></span><?php _e( 'Display Settings', 'content-views-query-and-display-post-page' ); ?>
|
129 |
</a>
|
130 |
</li>
|
131 |
<?php do_action( PT_CV_PREFIX_ . 'setting_tabs_header', $settings ); ?>
|
140 |
// Content type
|
141 |
array(
|
142 |
'label' => array(
|
143 |
+
'text' => __( 'Content type', 'content-views-query-and-display-post-page' ),
|
144 |
),
|
145 |
'params' => array(
|
146 |
+
apply_filters( PT_CV_PREFIX_ . 'contenttype_setting', array(
|
147 |
'type' => 'radio',
|
148 |
'name' => 'content-type',
|
149 |
'options' => PT_CV_Values::post_types(),
|
150 |
'std' => 'post',
|
151 |
+
) ),
|
152 |
),
|
153 |
),
|
154 |
// Upgrade to Pro: Custom post type
|
155 |
+
!get_option( 'pt_cv_version_pro' ) ? PT_CV_Settings::get_cvpro( __( 'Filter custom post type (product, event...)', 'content-views-query-and-display-post-page' ) ) : '',
|
156 |
apply_filters( PT_CV_PREFIX_ . 'custom_filters', array() ),
|
157 |
// Common Filters
|
158 |
array(
|
159 |
'label' => array(
|
160 |
+
'text' => __( 'Common filters', 'content-views-query-and-display-post-page' ),
|
161 |
),
|
162 |
'extra_setting' => array(
|
163 |
'params' => array(
|
172 |
// Includes
|
173 |
array(
|
174 |
'label' => array(
|
175 |
+
'text' => __( 'Include only', 'content-views-query-and-display-post-page' ),
|
176 |
),
|
177 |
'params' => array(
|
178 |
array(
|
179 |
'type' => 'text',
|
180 |
'name' => 'post__in',
|
181 |
'std' => '',
|
182 |
+
'desc' => apply_filters( PT_CV_PREFIX_ . 'setting_post_in', __( 'List of post IDs to show (comma-separated values, for example: 1,2,3)', 'content-views-query-and-display-post-page' ) ),
|
183 |
),
|
184 |
),
|
185 |
),
|
187 |
// Excludes
|
188 |
array(
|
189 |
'label' => array(
|
190 |
+
'text' => __( 'Exclude', 'content-views-query-and-display-post-page' ),
|
191 |
),
|
192 |
'params' => array(
|
193 |
array(
|
194 |
'type' => 'text',
|
195 |
'name' => 'post__not_in',
|
196 |
'std' => '',
|
197 |
+
'desc' => apply_filters( PT_CV_PREFIX_ . 'setting_post_not_in', __( 'List of post IDs to exclude (comma-separated values, for example: 1,2,3)', 'content-views-query-and-display-post-page' ) ),
|
198 |
),
|
199 |
),
|
200 |
'dependence' => array( 'post__in', '' ),
|
203 |
// Parent page
|
204 |
array(
|
205 |
'label' => array(
|
206 |
+
'text' => __( 'Parent page', 'content-views-query-and-display-post-page' ),
|
207 |
),
|
208 |
'params' => array(
|
209 |
array(
|
210 |
'type' => 'number',
|
211 |
'name' => 'post_parent',
|
212 |
'std' => '',
|
213 |
+
'desc' => apply_filters( PT_CV_PREFIX_ . 'setting_parent_page', __( 'Enter ID of parent page to show its children', 'content-views-query-and-display-post-page' ) ),
|
214 |
),
|
215 |
),
|
216 |
'dependence' => array( 'content-type', 'page' ),
|
219 |
// Limit
|
220 |
array(
|
221 |
'label' => array(
|
222 |
+
'text' => __( 'Limit', 'content-views-query-and-display-post-page' ),
|
223 |
),
|
224 |
'params' => array(
|
225 |
array(
|
227 |
'name' => 'limit',
|
228 |
'std' => '10',
|
229 |
'min' => '1',
|
230 |
+
'desc' => __( 'The number of posts to show. Set empty to show all found posts', 'content-views-query-and-display-post-page' ),
|
231 |
),
|
232 |
),
|
233 |
),
|
234 |
// Upgrade to Pro: Offset
|
235 |
+
apply_filters( PT_CV_PREFIX_ . 'after_limit_option', PT_CV_Settings::get_cvpro( __( 'Skip some posts', 'content-views-query-and-display-post-page' ), 12 ) ),
|
236 |
),
|
237 |
),
|
238 |
),
|
240 |
// Advanced Filters
|
241 |
array(
|
242 |
'label' => array(
|
243 |
+
'text' => __( 'Advanced filters', 'content-views-query-and-display-post-page' ),
|
244 |
),
|
245 |
'extra_setting' => array(
|
246 |
'params' => array(
|
292 |
'params' => apply_filters( PT_CV_PREFIX_ . 'advanced_settings_panel', array(
|
293 |
// Taxonomies Settings
|
294 |
'taxonomy' => array(
|
295 |
+
'parent_label' => sprintf( __( 'Filter by %s', 'content-views-query-and-display-post-page' ), __( 'Taxonomy', 'content-views-query-and-display-post-page' ) ),
|
296 |
// Taxonomies list
|
297 |
array(
|
298 |
'label' => array(
|
299 |
+
'text' => __( 'Select taxonomy', 'content-views-query-and-display-post-page' ),
|
300 |
),
|
301 |
'extra_setting' => array(
|
302 |
'params' => array(
|
310 |
'options' => PT_CV_Values::taxonomy_list(),
|
311 |
'std' => '',
|
312 |
'class' => 'taxonomy-item',
|
|
|
313 |
),
|
314 |
),
|
315 |
),
|
316 |
// Upgrade to Pro: Custom taxonomy
|
317 |
+
!get_option( 'pt_cv_version_pro' ) ? PT_CV_Settings::get_cvpro( __( 'Filter by custom taxonomies', 'content-views-query-and-display-post-page' ) ) : '',
|
318 |
// Terms list
|
319 |
array(
|
320 |
'label' => array(
|
321 |
+
'text' => '',
|
322 |
),
|
323 |
'extra_setting' => array(
|
324 |
'params' => array(
|
339 |
// Relation of taxonomies
|
340 |
array(
|
341 |
'label' => array(
|
342 |
+
'text' => __( 'Relation', 'content-views-query-and-display-post-page' ),
|
343 |
),
|
344 |
'params' => array(
|
345 |
array(
|
351 |
),
|
352 |
),
|
353 |
),
|
354 |
+
!get_option( 'pt_cv_version_pro' ) ? PT_CV_Settings::get_cvpro( sprintf( '<br>' . __( 'When you select any term above, it will not replace posts layout in term page (for example: %s) with layout of this View', 'content-views-query-and-display-post-page' ), '<code style="font-size: 11px;">http://yourdomain/category/selected_term/</code>' ), 10, null, true ) : '',
|
355 |
apply_filters( PT_CV_PREFIX_ . 'taxonomies_custom_settings', array() ),
|
356 |
), // End Taxonomies Settings
|
357 |
+
// Sort by Settings
|
358 |
'order' => array(
|
359 |
+
'parent_label' => __( 'Sort by', 'content-views-query-and-display-post-page' ),
|
360 |
array(
|
361 |
'label' => array(
|
362 |
+
'text' => __( 'Sort by', 'content-views-query-and-display-post-page' ),
|
363 |
),
|
364 |
'extra_setting' => array(
|
365 |
'params' => array(
|
379 |
), // End Order by Settings
|
380 |
// Author Settings
|
381 |
'author' => apply_filters( PT_CV_PREFIX_ . 'author_settings', array(
|
382 |
+
'parent_label' => sprintf( __( 'Filter by %s', 'content-views-query-and-display-post-page' ), __( 'Author' ) ),
|
383 |
array(
|
384 |
'label' => array(
|
385 |
+
'text' => __( 'By author', 'content-views-query-and-display-post-page' ),
|
386 |
),
|
387 |
'params' => array(
|
388 |
array(
|
398 |
$version_gt_37 ?
|
399 |
array(
|
400 |
'label' => array(
|
401 |
+
'text' => __( 'Not by author', 'content-views-query-and-display-post-page' ),
|
402 |
),
|
403 |
'params' => array(
|
404 |
array(
|
414 |
) ), // End Author Settings
|
415 |
// Status Settings
|
416 |
'status' => array(
|
417 |
+
'parent_label' => sprintf( __( 'Filter by %s', 'content-views-query-and-display-post-page' ), __( 'Status' ) ),
|
418 |
array(
|
419 |
+
'label' => array(
|
420 |
+
'text' => '',
|
421 |
),
|
422 |
+
'extra_setting' => array(
|
423 |
+
'params' => array(
|
424 |
+
'width' => 12,
|
425 |
+
),
|
426 |
+
),
|
427 |
+
'params' => array(
|
428 |
array(
|
429 |
'type' => 'select',
|
430 |
'name' => 'post_status',
|
432 |
'std' => 'publish',
|
433 |
'class' => 'select2',
|
434 |
'multiple' => '1',
|
435 |
+
'desc' => __( 'Select post status', 'content-views-query-and-display-post-page' ),
|
436 |
),
|
437 |
),
|
438 |
),
|
439 |
), // End Status Settings
|
440 |
// Keyword Settings
|
441 |
'search' => array(
|
442 |
+
'parent_label' => sprintf( __( 'Filter by %s', 'content-views-query-and-display-post-page' ), __( 'Keyword' ) ),
|
443 |
array(
|
444 |
+
'label' => array(
|
445 |
+
'text' => '',
|
446 |
),
|
447 |
+
'extra_setting' => array(
|
448 |
+
'params' => array(
|
449 |
+
'width' => 12,
|
450 |
+
),
|
451 |
+
),
|
452 |
+
'params' => array(
|
453 |
array(
|
454 |
'type' => 'text',
|
455 |
'name' => 's',
|
456 |
'std' => '',
|
457 |
+
'desc' => __( 'Enter keyword to searching for posts', 'content-views-query-and-display-post-page' ) . apply_filters( PT_CV_PREFIX_ . 'searchby_keyword_desc', '' ),
|
458 |
),
|
459 |
),
|
460 |
),
|
477 |
// View Type
|
478 |
array(
|
479 |
'label' => array(
|
480 |
+
'text' => __( 'View type (Layout)', 'content-views-query-and-display-post-page' ),
|
481 |
),
|
482 |
'params' => array(
|
483 |
+
apply_filters( PT_CV_PREFIX_ . 'viewtype_setting', array(
|
484 |
'type' => 'radio',
|
485 |
'name' => 'view-type',
|
486 |
'options' => PT_CV_Values::view_type(),
|
487 |
'std' => PT_CV_Functions::array_get_first_key( PT_CV_Values::view_type() ),
|
488 |
+
) ),
|
489 |
),
|
490 |
),
|
491 |
// View settings
|
492 |
array(
|
493 |
'label' => array(
|
494 |
+
'text' => '',
|
495 |
),
|
496 |
'params' => array(
|
497 |
array(
|
508 |
// Layout format of output item
|
509 |
array(
|
510 |
'label' => array(
|
511 |
+
'text' => __( 'Layout format', 'content-views-query-and-display-post-page' ),
|
512 |
),
|
513 |
'extra_setting' => array(
|
514 |
'params' => array(
|
550 |
array(
|
551 |
'type' => 'checkbox',
|
552 |
'name' => 'lf-mobile-disable',
|
553 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Disable this format on mobile devices & extra small screens', 'content-views-query-and-display-post-page' ) ),
|
554 |
'std' => '',
|
555 |
),
|
556 |
),
|
563 |
// Fields settings
|
564 |
array(
|
565 |
'label' => array(
|
566 |
+
'text' => __( 'Fields settings', 'content-views-query-and-display-post-page' ),
|
567 |
),
|
568 |
'extra_setting' => array(
|
569 |
'params' => array(
|
581 |
// Pagination settings
|
582 |
array(
|
583 |
'label' => array(
|
584 |
+
'text' => __( 'Pagination', 'content-views-query-and-display-post-page' ),
|
585 |
),
|
586 |
'extra_setting' => array(
|
587 |
'params' => array(
|
598 |
// Other settings
|
599 |
array(
|
600 |
'label' => array(
|
601 |
+
'text' => __( 'Others', 'content-views-query-and-display-post-page' ),
|
602 |
),
|
603 |
'extra_setting' => array(
|
604 |
'params' => array(
|
629 |
<div class="clearfix"></div>
|
630 |
<hr>
|
631 |
<!-- Save -->
|
632 |
+
<input type="submit" class="btn btn-primary pull-right <?php echo esc_attr( PT_CV_PREFIX ); ?>save-view" value="<?php _e( 'Save' ); ?>">
|
633 |
</form>
|
634 |
</div>
|
assets/bootstrap/js/bootstrap.custom.min.js
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Copyright 2011-2015 Twitter, Inc.
|
5 |
* Licensed under the MIT license
|
6 |
*/
|
7 |
-
if(typeof jQuery==="undefined"){throw new Error("Bootstrap's JavaScript requires jQuery")}+function(b){function a(){var e=document.createElement("bootstrap");var d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in d){if(e.style[c]!==undefined){return{end:d[c]}}}return false}b.fn.emulateTransitionEnd=function(e){var d=false;var c=this;b(this).one("bsTransitionEnd",function(){d=true});var f=function(){if(!d){b(c).trigger(b.support.transition.end)}};setTimeout(f,e);return this};b(function(){b.support.transition=a();if(!b.support.transition){return}b.event.special.bsTransitionEnd={bindType:b.support.transition.end,delegateType:b.support.transition.end,handle:function(c){if(b(c.target).is(this)){return c.handleObj.handler.apply(this,arguments)}}}})}(jQuery);+function(c){var d=function(g,f){this.$element=c(g);this.$indicators=this.$element.find(".pt-cv-carousel-indicators");this.options=f;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",c.proxy(this.keydown,this));this.options.pause=="hover"&&!("ontouchstart" in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",c.proxy(this.pause,this)).on("mouseleave.bs.carousel",c.proxy(this.cycle,this))};d.VERSION="3.3.5";d.TRANSITION_DURATION=600;d.DEFAULTS={interval:5000,pause:"hover",wrap:true,keyboard:true};d.prototype.keydown=function(f){if(/input|textarea/i.test(f.target.tagName)){return}switch(f.which){case 37:this.prev();break;case 39:this.next();break;default:return}f.preventDefault()};d.prototype.cycle=function(f){f||(this.paused=false);this.interval&&clearInterval(this.interval);this.options.interval&&!this.paused&&(this.interval=setInterval(c.proxy(this.next,this),this.options.interval));return this};d.prototype.getItemIndex=function(f){this.$items=f.parent().children(".item");return this.$items.index(f||this.$active)};d.prototype.getItemForDirection=function(j,i){var f=this.getItemIndex(i);var g=(j=="prev"&&f===0)||(j=="next"&&f==(this.$items.length-1));if(g&&!this.options.wrap){return i}var k=j=="prev"?-1:1;var h=(f+k)%this.$items.length;return this.$items.eq(h)};d.prototype.to=function(h){var g=this;var f=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(h>(this.$items.length-1)||h<0){return}if(this.sliding){return this.$element.one("slid.bs.carousel",function(){g.to(h)})}if(f==h){return this.pause().cycle()}return this.slide(h>f?"next":"prev",this.$items.eq(h))};d.prototype.pause=function(f){f||(this.paused=true);if(this.$element.find(".next, .prev").length&&c.support.transition){this.$element.trigger(c.support.transition.end);this.cycle(true)}this.interval=clearInterval(this.interval);return this};d.prototype.next=function(){if(this.sliding){return}return this.slide("next")};d.prototype.prev=function(){if(this.sliding){return}return this.slide("prev")};d.prototype.slide=function(m,i){var p=this.$element.find(".item.active");var g=i||this.getItemForDirection(m,p);var k=this.interval;var n=m=="next"?"left":"right";var j=this;if(g.hasClass("active")){return(this.sliding=false)}var l=g[0];var f=c.Event("slide.bs.carousel",{relatedTarget:l,direction:n});this.$element.trigger(f);if(f.isDefaultPrevented()){return}this.sliding=true;k&&this.pause();if(this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=c(this.$indicators.children()[this.getItemIndex(g)]);h&&h.addClass("active")}var o=c.Event("slid.bs.carousel",{relatedTarget:l,direction:n});if(c.support.transition&&this.$element.hasClass("slide")){g.addClass(m);g[0].offsetWidth;p.addClass(n);g.addClass(n);p.one("bsTransitionEnd",function(){g.removeClass([m,n].join(" ")).addClass("active");p.removeClass(["active",n].join(" "));j.sliding=false;setTimeout(function(){j.$element.trigger(o)},0)}).emulateTransitionEnd(d.TRANSITION_DURATION)}else{p.removeClass("active");g.addClass("active");this.sliding=false;this.$element.trigger(o)}k&&this.cycle();return this};function b(f){return this.each(function(){var j=c(this);var i=j.data("bs.carousel");var g=c.extend({},d.DEFAULTS,j.data(),typeof f=="object"&&f);var h=typeof f=="string"?f:g.slide;if(!i){j.data("bs.carousel",(i=new d(this,g)))}if(typeof f=="number"){i.to(f)}else{if(h){i[h]()}else{if(g.interval){i.pause().cycle()}}}})}var a=c.fn.carousel;if(!a){c.fn.carousel=b;c.fn.carousel.Constructor=d}else{c(document).trigger("cvp-off-events")}var e=function(k){var g;var j=c(this);var f=c(j.attr("data-target")||(g=j.attr("href"))&&g.replace(/.*(?=#[^\s]+$)/,""));if(!f.hasClass("carousel")){return}var h=c.extend({},f.data(),j.data());var i=j.attr("data-slide-to");if(i){h.interval=false}b.call(f,h);if(i){f.data("bs.carousel").to(i)}k.preventDefault()};c(document).ready(function(){c(".pt-cv-wrapper").on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e)});c(window).on("load",function(){c('[data-ride="carousel"]',".pt-cv-wrapper").each(function(){var f=c(this);b.call(f,f.data())})})}(jQuery);+function(d){var e=function(g,f){this.$element=d(g);this.options=d.extend({},e.DEFAULTS,f);this.$trigger=d('[data-toggle="collapse"][href="#'+g.id+'"],[data-toggle="collapse"][data-target="#'+g.id+'"]');this.transitioning=null;if(this.options.parent){this.$parent=this.getParent()}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger)}if(this.options.toggle){this.toggle()}};e.VERSION="3.3.5";e.TRANSITION_DURATION=350;e.DEFAULTS={toggle:true};e.prototype.dimension=function(){var f=this.$element.hasClass("width");return f?"width":"height"};e.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in")){return}var h;var j=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(j&&j.length){h=j.data("bs.collapse");if(h&&h.transitioning){return}}var g=d.Event("show.bs.collapse");this.$element.trigger(g);if(g.isDefaultPrevented()){return}if(j&&j.length){b.call(j,"hide");h||j.data("bs.collapse",null)}var k=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[k](0).attr("aria-expanded",true);this.$trigger.removeClass("collapsed").attr("aria-expanded",true);this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[k]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")};if(!d.support.transition){return f.call(this)}var i=d.camelCase(["scroll",k].join("-"));this.$element.one("bsTransitionEnd",d.proxy(f,this)).emulateTransitionEnd(e.TRANSITION_DURATION)[k](this.$element[0][i])};e.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in")){return}var g=d.Event("hide.bs.collapse");this.$element.trigger(g);if(g.isDefaultPrevented()){return}var h=this.dimension();this.$element[h](this.$element[h]())[0].offsetHeight;this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",false);this.$trigger.addClass("collapsed").attr("aria-expanded",false);this.transitioning=1;var f=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!d.support.transition){return f.call(this)}this.$element[h](0).one("bsTransitionEnd",d.proxy(f,this)).emulateTransitionEnd(e.TRANSITION_DURATION)};e.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};e.prototype.getParent=function(){return d(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(d.proxy(function(h,g){var f=d(g);this.addAriaAndCollapsedClass(c(f),f)},this)).end()};e.prototype.addAriaAndCollapsedClass=function(g,f){var h=g.hasClass("in");g.attr("aria-expanded",h);f.toggleClass("collapsed",!h).attr("aria-expanded",h)};function c(f){var g;var h=f.attr("data-target")||(g=f.attr("href"))&&g.replace(/.*(?=#[^\s]+$)/,"");return d(h)}function b(f){return this.each(function(){var i=d(this);var h=i.data("bs.collapse");var g=d.extend({},e.DEFAULTS,i.data(),typeof f=="object"&&f);if(!h&&g.toggle&&/show|hide/.test(f)){g.toggle=false}if(!h){i.data("bs.collapse",(h=new e(this,g)))}if(typeof f=="string"){h[f]()}})}var a=d.fn.collapse;if(!a){d.fn.collapse=b;d.fn.collapse.Constructor=e}else{d(document).trigger("cvp-off-events")}d(document).ready(function(){d(".pt-cv-wrapper").on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(j){var i=d(this);if(!i.attr("data-target")){j.preventDefault()}var f=c(i);var h=f.data("bs.collapse");var g=h?"toggle":i.data();b.call(f,g)})})}(jQuery);+function(h){var e=".dropdown-backdrop";var b='[data-toggle="dropdown"]';var a=function(i){h(i).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.5";function f(k){var i=k.attr("data-target");if(!i){i=k.attr("href");i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")}var j=i&&h(i);return j&&j.length?j:k.parent()}function d(i){if(i&&i.which===3){return}h(e).remove();h(b).each(function(){var l=h(this);var k=f(l);var j={relatedTarget:this};if(!k.hasClass("open")){return}if(i&&i.type=="click"&&/input|textarea/i.test(i.target.tagName)&&h.contains(k[0],i.target)){return}k.trigger(i=h.Event("hide.bs.dropdown",j));if(i.isDefaultPrevented()){return}l.attr("aria-expanded","false");k.removeClass("open").trigger("hidden.bs.dropdown",j)})}a.prototype.toggle=function(m){var l=h(this);if(l.is(".disabled, :disabled")){return}var k=f(l);var j=k.hasClass("open");d();if(!j){if("ontouchstart" in document.documentElement&&!k.closest(".navbar-nav").length){h(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(h(this)).on("click",d)}var i={relatedTarget:this};k.trigger(m=h.Event("show.bs.dropdown",i));if(m.isDefaultPrevented()){return}l.trigger("focus").attr("aria-expanded","true");k.toggleClass("open").trigger("shown.bs.dropdown",i)}return false};a.prototype.keydown=function(m){if(!/(38|40|27|32)/.test(m.which)||/input|textarea/i.test(m.target.tagName)){return}var l=h(this);m.preventDefault();m.stopPropagation();if(l.is(".disabled, :disabled")){return}var k=f(l);var j=k.hasClass("open");if(!j&&m.which!=27||j&&m.which==27){if(m.which==27){k.find(b).trigger("focus")}return l.trigger("click")}var n=" li:not(.disabled):visible a";var o=k.find(".dropdown-menu"+n);if(!o.length){return}var i=o.index(m.target);if(m.which==38&&i>0){i--}if(m.which==40&&i<o.length-1){i++}if(!~i){i=0}o.eq(i).trigger("focus")};function g(i){return this.each(function(){var k=h(this);var j=k.data("bs.dropdown");if(!j){k.data("bs.dropdown",(j=new a(this)))}if(typeof i=="string"){j[i].call(k)}})}var c=h.fn.dropdown;if(!c){h.fn.dropdown=g;h.fn.dropdown.Constructor=a}else{h(document).trigger("cvp-off-events")}h(document).ready(function(){h(".pt-cv-wrapper").on("click.bs.dropdown.data-api",d).on("click.bs.dropdown.data-api",".dropdown form",function(i){i.stopPropagation()}).on("click.bs.dropdown.data-api",b,a.prototype.toggle).on("keydown.bs.dropdown.data-api",b,a.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",a.prototype.keydown)})}(jQuery);+function(d){var b=function(f){this.element=d(f)};b.VERSION="3.3.5";b.TRANSITION_DURATION=150;b.prototype.show=function(){var l=this.element;var h=l.closest("ul:not(.dropdown-menu)");var g=l.data("target");if(!g){g=l.attr("href");g=g&&g.replace(/.*(?=#[^\s]*$)/,"")}if(l.parent("li").hasClass("active")){return}var j=h.find(".active:last a");var k=d.Event("hide.bs.tab",{relatedTarget:l[0]});var i=d.Event("show.bs.tab",{relatedTarget:j[0]});j.trigger(k);l.trigger(i);if(i.isDefaultPrevented()||k.isDefaultPrevented()){return}var f=d(g);this.activate(l.closest("li"),h);this.activate(f,f.parent(),function(){j.trigger({type:"hidden.bs.tab",relatedTarget:l[0]});l.trigger({type:"shown.bs.tab",relatedTarget:j[0]})})};b.prototype.activate=function(h,g,k){var f=g.find("> .active");var j=k&&d.support.transition&&(f.length&&f.hasClass("fade")||!!g.find("> .fade").length);function i(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",false);h.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",true);if(j){h[0].offsetWidth;h.addClass("in")}else{h.removeClass("fade")}if(h.parent(".dropdown-menu").length){h.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",true)}k&&k()}f.length&&j?f.one("bsTransitionEnd",i).emulateTransitionEnd(b.TRANSITION_DURATION):i();f.removeClass("in")};function c(f){return this.each(function(){var h=d(this);var g=h.data("bs.tab");if(!g){h.data("bs.tab",(g=new b(this)))}if(typeof f=="string"){g[f]()}})}var a=d.fn.tab;if(!a){d.fn.tab=c;d.fn.tab.Constructor=b}else{d(document).trigger("cvp-off-events")}var e=function(f){f.preventDefault();c.call(d(this),"show")};d(document).ready(function(){d(".pt-cv-wrapper").on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)})}(jQuery);
|
8 |
|
9 |
|
10 |
/**
|
4 |
* Copyright 2011-2015 Twitter, Inc.
|
5 |
* Licensed under the MIT license
|
6 |
*/
|
7 |
+
if(typeof jQuery==="undefined"){throw new Error("Bootstrap's JavaScript requires jQuery")}+function(b){function a(){var e=document.createElement("bootstrap");var d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in d){if(e.style[c]!==undefined){return{end:d[c]}}}return false}b.fn.emulateTransitionEnd=function(e){var d=false;var c=this;b(this).one("bsTransitionEnd",function(){d=true});var f=function(){if(!d){b(c).trigger(b.support.transition.end)}};setTimeout(f,e);return this};b(function(){b.support.transition=a();if(!b.support.transition){return}b.event.special.bsTransitionEnd={bindType:b.support.transition.end,delegateType:b.support.transition.end,handle:function(c){if(b(c.target).is(this)){return c.handleObj.handler.apply(this,arguments)}}}})}(jQuery);+function(c){var d=function(g,f){this.$element=c(g);this.$indicators=this.$element.find(".pt-cv-carousel-indicators");this.options=f;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",c.proxy(this.keydown,this));this.options.pause=="hover"&&!("ontouchstart" in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",c.proxy(this.pause,this)).on("mouseleave.bs.carousel",c.proxy(this.cycle,this))};d.VERSION="3.3.5";d.TRANSITION_DURATION=600;d.DEFAULTS={interval:5000,pause:"hover",wrap:true,keyboard:true};d.prototype.keydown=function(f){if(/input|textarea/i.test(f.target.tagName)){return}switch(f.which){case 37:this.prev();break;case 39:this.next();break;default:return}f.preventDefault()};d.prototype.cycle=function(f){f||(this.paused=false);this.interval&&clearInterval(this.interval);this.options.interval&&!this.paused&&(this.interval=setInterval(c.proxy(this.next,this),this.options.interval));return this};d.prototype.getItemIndex=function(f){this.$items=f.parent().children(".item");return this.$items.index(f||this.$active)};d.prototype.getItemForDirection=function(j,i){var f=this.getItemIndex(i);var g=(j=="prev"&&f===0)||(j=="next"&&f==(this.$items.length-1));if(g&&!this.options.wrap){return i}var k=j=="prev"?-1:1;var h=(f+k)%this.$items.length;return this.$items.eq(h)};d.prototype.to=function(h){var g=this;var f=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(h>(this.$items.length-1)||h<0){return}if(this.sliding){return this.$element.one("slid.bs.carousel",function(){g.to(h)})}if(f==h){return this.pause().cycle()}return this.slide(h>f?"next":"prev",this.$items.eq(h))};d.prototype.pause=function(f){f||(this.paused=true);if(this.$element.find(".next, .prev").length&&c.support.transition){this.$element.trigger(c.support.transition.end);this.cycle(true)}this.interval=clearInterval(this.interval);return this};d.prototype.next=function(){if(this.sliding){return}return this.slide("next")};d.prototype.prev=function(){if(this.sliding){return}return this.slide("prev")};d.prototype.slide=function(m,i){var p=this.$element.find(".item.active");var g=i||this.getItemForDirection(m,p);var k=this.interval;var n=m=="next"?"left":"right";var j=this;if(g.hasClass("active")){return(this.sliding=false)}var l=g[0];var f=c.Event("slide.bs.carousel",{relatedTarget:l,direction:n});this.$element.trigger(f);if(f.isDefaultPrevented()){return}this.sliding=true;k&&this.pause();if(this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=c(this.$indicators.children()[this.getItemIndex(g)]);h&&h.addClass("active")}var o=c.Event("slid.bs.carousel",{relatedTarget:l,direction:n});if(c.support.transition&&this.$element.hasClass("slide")){g.addClass(m);g[0].offsetWidth;p.addClass(n);g.addClass(n);p.one("bsTransitionEnd",function(){g.removeClass([m,n].join(" ")).addClass("active");p.removeClass(["active",n].join(" "));j.sliding=false;setTimeout(function(){j.$element.trigger(o)},0)}).emulateTransitionEnd(d.TRANSITION_DURATION)}else{p.removeClass("active");g.addClass("active");this.sliding=false;this.$element.trigger(o)}k&&this.cycle();return this};function b(f){return this.each(function(){var j=c(this);var i=j.data("bs.carousel");var g=c.extend({},d.DEFAULTS,j.data(),typeof f=="object"&&f);var h=typeof f=="string"?f:g.cvslide;if(!i){j.data("bs.carousel",(i=new d(this,g)))}if(typeof f=="number"){i.to(f)}else{if(h){i[h]()}else{if(g.interval){i.pause().cycle()}}}})}var a=c.fn.carousel;if(!a){c.fn.carousel=b;c.fn.carousel.Constructor=d}var e=function(k){var g;var j=c(this);var f=c(j.attr("data-target")||(g=j.attr("href"))&&g.replace(/.*(?=#[^\s]+$)/,""));if(!f.hasClass("carousel")){return}var h=c.extend({},f.data(),j.data());var i=j.attr("data-cvslide-to");if(i){h.interval=false}b.call(f,h);if(i){f.data("bs.carousel").to(i)}k.preventDefault()};c(document).ready(function(){c(".pt-cv-wrapper").on("click.bs.carousel.data-api","[data-cvslide]",e).on("click.bs.carousel.data-api","[data-cvslide-to]",e)});c(window).on("load",function(){c('[data-ride="carousel"]',".pt-cv-wrapper").each(function(){var f=c(this);b.call(f,f.data())})})}(jQuery);+function(d){var e=function(g,f){this.$element=d(g);this.options=d.extend({},e.DEFAULTS,f);this.$trigger=d('[data-toggle="collapse"][href="#'+g.id+'"],[data-toggle="collapse"][data-target="#'+g.id+'"]');this.transitioning=null;if(this.options.parent){this.$parent=this.getParent()}else{this.addAriaAndCollapsedClass(this.$element,this.$trigger)}if(this.options.toggle){this.toggle()}};e.VERSION="3.3.5";e.TRANSITION_DURATION=350;e.DEFAULTS={toggle:true};e.prototype.dimension=function(){var f=this.$element.hasClass("width");return f?"width":"height"};e.prototype.show=function(){if(this.transitioning||this.$element.hasClass("in")){return}var h;var j=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(j&&j.length){h=j.data("bs.collapse");if(h&&h.transitioning){return}}var g=d.Event("show.bs.collapse");this.$element.trigger(g);if(g.isDefaultPrevented()){return}if(j&&j.length){b.call(j,"hide");h||j.data("bs.collapse",null)}var k=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[k](0).attr("aria-expanded",true);this.$trigger.removeClass("collapsed").attr("aria-expanded",true);this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[k]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")};if(!d.support.transition){return f.call(this)}var i=d.camelCase(["scroll",k].join("-"));this.$element.one("bsTransitionEnd",d.proxy(f,this)).emulateTransitionEnd(e.TRANSITION_DURATION)[k](this.$element[0][i])};e.prototype.hide=function(){if(this.transitioning||!this.$element.hasClass("in")){return}var g=d.Event("hide.bs.collapse");this.$element.trigger(g);if(g.isDefaultPrevented()){return}var h=this.dimension();this.$element[h](this.$element[h]())[0].offsetHeight;this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",false);this.$trigger.addClass("collapsed").attr("aria-expanded",false);this.transitioning=1;var f=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!d.support.transition){return f.call(this)}this.$element[h](0).one("bsTransitionEnd",d.proxy(f,this)).emulateTransitionEnd(e.TRANSITION_DURATION)};e.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};e.prototype.getParent=function(){return d(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(d.proxy(function(h,g){var f=d(g);this.addAriaAndCollapsedClass(c(f),f)},this)).end()};e.prototype.addAriaAndCollapsedClass=function(g,f){var h=g.hasClass("in");g.attr("aria-expanded",h);f.toggleClass("collapsed",!h).attr("aria-expanded",h)};function c(f){var g;var h=f.attr("data-target")||(g=f.attr("href"))&&g.replace(/.*(?=#[^\s]+$)/,"");return d(h)}function b(f){return this.each(function(){var i=d(this);var h=i.data("bs.collapse");var g=d.extend({},e.DEFAULTS,i.data(),typeof f=="object"&&f);if(!h&&g.toggle&&/show|hide/.test(f)){g.toggle=false}if(!h){i.data("bs.collapse",(h=new e(this,g)))}if(typeof f=="string"){h[f]()}})}var a=d.fn.collapse;if(!a){d.fn.collapse=b;d.fn.collapse.Constructor=e}d(document).ready(function(){d(".pt-cv-wrapper").on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(j){var i=d(this);if(!i.attr("data-target")){j.preventDefault()}var f=c(i);var h=f.data("bs.collapse");var g=h?"toggle":i.data();b.call(f,g)})})}(jQuery);+function(h){var e=".dropdown-backdrop";var b='[data-toggle="dropdown"]';var a=function(i){h(i).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.5";function f(k){var i=k.attr("data-target");if(!i){i=k.attr("href");i=i&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")}var j=i&&h(i);return j&&j.length?j:k.parent()}function d(i){if(i&&i.which===3){return}h(e).remove();h(b).each(function(){var l=h(this);var k=f(l);var j={relatedTarget:this};if(!k.hasClass("open")){return}if(i&&i.type=="click"&&/input|textarea/i.test(i.target.tagName)&&h.contains(k[0],i.target)){return}k.trigger(i=h.Event("hide.bs.dropdown",j));if(i.isDefaultPrevented()){return}l.attr("aria-expanded","false");k.removeClass("open").trigger("hidden.bs.dropdown",j)})}a.prototype.toggle=function(m){var l=h(this);if(l.is(".disabled, :disabled")){return}var k=f(l);var j=k.hasClass("open");d();if(!j){if("ontouchstart" in document.documentElement&&!k.closest(".navbar-nav").length){h(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(h(this)).on("click",d)}var i={relatedTarget:this};k.trigger(m=h.Event("show.bs.dropdown",i));if(m.isDefaultPrevented()){return}l.trigger("focus").attr("aria-expanded","true");k.toggleClass("open").trigger("shown.bs.dropdown",i)}return false};a.prototype.keydown=function(m){if(!/(38|40|27|32)/.test(m.which)||/input|textarea/i.test(m.target.tagName)){return}var l=h(this);m.preventDefault();m.stopPropagation();if(l.is(".disabled, :disabled")){return}var k=f(l);var j=k.hasClass("open");if(!j&&m.which!=27||j&&m.which==27){if(m.which==27){k.find(b).trigger("focus")}return l.trigger("click")}var n=" li:not(.disabled):visible a";var o=k.find(".dropdown-menu"+n);if(!o.length){return}var i=o.index(m.target);if(m.which==38&&i>0){i--}if(m.which==40&&i<o.length-1){i++}if(!~i){i=0}o.eq(i).trigger("focus")};function g(i){return this.each(function(){var k=h(this);var j=k.data("bs.dropdown");if(!j){k.data("bs.dropdown",(j=new a(this)))}if(typeof i=="string"){j[i].call(k)}})}var c=h.fn.dropdown;if(!c){h.fn.dropdown=g;h.fn.dropdown.Constructor=a}h(document).ready(function(){h(".pt-cv-wrapper").on("click.bs.dropdown.data-api",d).on("click.bs.dropdown.data-api",".dropdown form",function(i){i.stopPropagation()}).on("click.bs.dropdown.data-api",b,a.prototype.toggle).on("keydown.bs.dropdown.data-api",b,a.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",a.prototype.keydown)})}(jQuery);+function(d){var b=function(f){this.element=d(f)};b.VERSION="3.3.5";b.TRANSITION_DURATION=150;b.prototype.show=function(){var l=this.element;var h=l.closest("ul:not(.dropdown-menu)");var g=l.data("target");if(!g){g=l.attr("href");g=g&&g.replace(/.*(?=#[^\s]*$)/,"")}if(l.parent("li").hasClass("active")){return}var j=h.find(".active:last a");var k=d.Event("hide.bs.tab",{relatedTarget:l[0]});var i=d.Event("show.bs.tab",{relatedTarget:j[0]});j.trigger(k);l.trigger(i);if(i.isDefaultPrevented()||k.isDefaultPrevented()){return}var f=d(g);this.activate(l.closest("li"),h);this.activate(f,f.parent(),function(){j.trigger({type:"hidden.bs.tab",relatedTarget:l[0]});l.trigger({type:"shown.bs.tab",relatedTarget:j[0]})})};b.prototype.activate=function(h,g,k){var f=g.find("> .active");var j=k&&d.support.transition&&(f.length&&f.hasClass("fade")||!!g.find("> .fade").length);function i(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",false);h.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",true);if(j){h[0].offsetWidth;h.addClass("in")}else{h.removeClass("fade")}if(h.parent(".dropdown-menu").length){h.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",true)}k&&k()}f.length&&j?f.one("bsTransitionEnd",i).emulateTransitionEnd(b.TRANSITION_DURATION):i();f.removeClass("in")};function c(f){return this.each(function(){var h=d(this);var g=h.data("bs.tab");if(!g){h.data("bs.tab",(g=new b(this)))}if(typeof f=="string"){g[f]()}})}var a=d.fn.tab;if(!a){d.fn.tab=c;d.fn.tab.Constructor=b}var e=function(f){f.preventDefault();c.call(d(this),"show")};d(document).ready(function(){d(".pt-cv-wrapper").on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)})}(jQuery);
|
8 |
|
9 |
|
10 |
/**
|
content-views.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
* Plugin Name: Content Views
|
12 |
* Plugin URI: http://wordpress.org/plugins/content-views-query-and-display-post-page/
|
13 |
* Description: Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
|
14 |
-
* Version: 1.8.
|
15 |
* Author: PT Guy
|
16 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
17 |
* Text Domain: content-views-query-and-display-post-page
|
@@ -26,7 +26,7 @@ if ( !defined( 'WPINC' ) ) {
|
|
26 |
}
|
27 |
|
28 |
// Define Constant
|
29 |
-
define( 'PT_CV_VERSION', '1.8.
|
30 |
define( 'PT_CV_FILE', __FILE__ );
|
31 |
define( 'PT_CV_PATH', plugin_dir_path( __FILE__ ) );
|
32 |
include_once( PT_CV_PATH . 'includes/defines.php' );
|
11 |
* Plugin Name: Content Views
|
12 |
* Plugin URI: http://wordpress.org/plugins/content-views-query-and-display-post-page/
|
13 |
* Description: Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
|
14 |
+
* Version: 1.8.4
|
15 |
* Author: PT Guy
|
16 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
17 |
* Text Domain: content-views-query-and-display-post-page
|
26 |
}
|
27 |
|
28 |
// Define Constant
|
29 |
+
define( 'PT_CV_VERSION', '1.8.4' );
|
30 |
define( 'PT_CV_FILE', __FILE__ );
|
31 |
define( 'PT_CV_PATH', plugin_dir_path( __FILE__ ) );
|
32 |
include_once( PT_CV_PATH . 'includes/defines.php' );
|
includes/functions.php
CHANGED
@@ -453,7 +453,7 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
453 |
$include_this = apply_filters( PT_CV_PREFIX_ . 'terms_include_this', true, $term );
|
454 |
if ( $include_this && in_array( $term->taxonomy, $taxonomies_to_show ) ) {
|
455 |
$href = esc_url( get_term_link( $term, $term->taxonomy ) );
|
456 |
-
$text = __( 'View all posts in',
|
457 |
$term_name = esc_attr( $term->name );
|
458 |
$class = esc_attr( PT_CV_PREFIX . 'tax-' . PT_CV_Functions::term_slug_sanitize( $term->slug ) );
|
459 |
$term_html = "<a href='$href' title='$text $term_name' class='$class'>{$term->name}</a>";
|
@@ -498,7 +498,7 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
498 |
$count = 1;
|
499 |
}
|
500 |
|
501 |
-
return _n( 'view', 'views', $count,
|
502 |
}
|
503 |
|
504 |
/**
|
@@ -515,7 +515,7 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
515 |
'ID' => (int) $arr[ 'ID' ],
|
516 |
'post_type' => PT_CV_POST_TYPE,
|
517 |
'post_content' => '',
|
518 |
-
'post_title' => !empty( $arr[ 'title' ] ) ? $arr[ 'title' ] : __( '(no title)',
|
519 |
'post_status' => 'publish',
|
520 |
);
|
521 |
|
@@ -579,7 +579,7 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
579 |
static function _nonce_check( $nonce_name, $action_name ) {
|
580 |
$nonce_name = PT_CV_PREFIX_ . $nonce_name;
|
581 |
if ( !isset( $_POST[ $nonce_name ] ) || !wp_verify_nonce( $_POST[ $nonce_name ], PT_CV_PREFIX_ . $action_name ) ) {
|
582 |
-
|
583 |
exit;
|
584 |
}
|
585 |
}
|
@@ -617,7 +617,7 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
617 |
*/
|
618 |
static function view_process_settings( $view_id, $settings, $pargs = array() ) {
|
619 |
if ( empty( $settings[ PT_CV_PREFIX . 'view-type' ] ) ) {
|
620 |
-
return sprintf( __( 'Empty settings (View %s is not existed)',
|
621 |
}
|
622 |
|
623 |
// Check duplicated
|
@@ -996,14 +996,14 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
996 |
|
997 |
// Order
|
998 |
case 'order':
|
999 |
-
$
|
|
|
|
|
1000 |
PT_CV_PREFIX_ . 'order_setting', array(
|
1001 |
-
'orderby' =>
|
1002 |
-
'order' =>
|
1003 |
-
)
|
1004 |
-
);
|
1005 |
-
|
1006 |
-
$args = array_merge( $args, $order_settings );
|
1007 |
break;
|
1008 |
|
1009 |
default:
|
453 |
$include_this = apply_filters( PT_CV_PREFIX_ . 'terms_include_this', true, $term );
|
454 |
if ( $include_this && in_array( $term->taxonomy, $taxonomies_to_show ) ) {
|
455 |
$href = esc_url( get_term_link( $term, $term->taxonomy ) );
|
456 |
+
$text = __( 'View all posts in', 'content-views-query-and-display-post-page' );
|
457 |
$term_name = esc_attr( $term->name );
|
458 |
$class = esc_attr( PT_CV_PREFIX . 'tax-' . PT_CV_Functions::term_slug_sanitize( $term->slug ) );
|
459 |
$term_html = "<a href='$href' title='$text $term_name' class='$class'>{$term->name}</a>";
|
498 |
$count = 1;
|
499 |
}
|
500 |
|
501 |
+
return _n( 'view', 'views', $count, 'content-views-query-and-display-post-page' );
|
502 |
}
|
503 |
|
504 |
/**
|
515 |
'ID' => (int) $arr[ 'ID' ],
|
516 |
'post_type' => PT_CV_POST_TYPE,
|
517 |
'post_content' => '',
|
518 |
+
'post_title' => !empty( $arr[ 'title' ] ) ? $arr[ 'title' ] : __( '(no title)', 'content-views-query-and-display-post-page' ),
|
519 |
'post_status' => 'publish',
|
520 |
);
|
521 |
|
579 |
static function _nonce_check( $nonce_name, $action_name ) {
|
580 |
$nonce_name = PT_CV_PREFIX_ . $nonce_name;
|
581 |
if ( !isset( $_POST[ $nonce_name ] ) || !wp_verify_nonce( $_POST[ $nonce_name ], PT_CV_PREFIX_ . $action_name ) ) {
|
582 |
+
_e( 'Cheatin’ uh?' );
|
583 |
exit;
|
584 |
}
|
585 |
}
|
617 |
*/
|
618 |
static function view_process_settings( $view_id, $settings, $pargs = array() ) {
|
619 |
if ( empty( $settings[ PT_CV_PREFIX . 'view-type' ] ) ) {
|
620 |
+
return sprintf( __( 'Empty settings (View %s is not existed)', 'content-views-query-and-display-post-page' ), "<strong>$view_id</strong>" );
|
621 |
}
|
622 |
|
623 |
// Check duplicated
|
996 |
|
997 |
// Order
|
998 |
case 'order':
|
999 |
+
$orderby = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'orderby', $view_settings );
|
1000 |
+
$order = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'order', $view_settings );
|
1001 |
+
$order_settings = apply_filters(
|
1002 |
PT_CV_PREFIX_ . 'order_setting', array(
|
1003 |
+
'orderby' => $orderby,
|
1004 |
+
'order' => $orderby ? $order : '',
|
1005 |
+
) );
|
1006 |
+
$args = array_merge( $args, $order_settings );
|
|
|
|
|
1007 |
break;
|
1008 |
|
1009 |
default:
|
includes/hooks.php
CHANGED
@@ -55,12 +55,12 @@ if ( !class_exists( 'PT_CV_Hooks' ) ) {
|
|
55 |
|
56 |
$messages = array(
|
57 |
'field' => array(
|
58 |
-
'select' => __( 'Please select an option in
|
59 |
-
'text' => __( 'Please set value in
|
60 |
),
|
61 |
'tab' => array(
|
62 |
-
'filter' => __( 'Filter Settings',
|
63 |
-
'display' => __( 'Display Settings',
|
64 |
),
|
65 |
);
|
66 |
|
@@ -69,7 +69,7 @@ if ( !class_exists( 'PT_CV_Hooks' ) ) {
|
|
69 |
*/
|
70 |
// Post type
|
71 |
if ( empty( $args[ 'post_type' ] ) ) {
|
72 |
-
$errors[] = $messages[ 'field' ][ 'select' ] . $messages[ 'tab' ][ 'filter' ] . ' > ' . __( 'Content type',
|
73 |
}
|
74 |
|
75 |
/**
|
@@ -77,23 +77,23 @@ if ( !class_exists( 'PT_CV_Hooks' ) ) {
|
|
77 |
*/
|
78 |
// View type
|
79 |
if ( empty( $dargs[ 'view-type' ] ) ) {
|
80 |
-
$errors[] = $messages[ 'field' ][ 'select' ] . $messages[ 'tab' ][ 'display' ] . ' > ' . __( 'View type',
|
81 |
}
|
82 |
|
83 |
// Layout format
|
84 |
if ( empty( $dargs[ 'layout-format' ] ) ) {
|
85 |
-
$errors[] = $messages[ 'field' ][ 'select' ] . $messages[ 'tab' ][ 'display' ] . ' > ' . __( 'Layout format',
|
86 |
}
|
87 |
|
88 |
// Field settings
|
89 |
if ( !isset( $dargs[ 'fields' ] ) ) {
|
90 |
-
$errors[] = $messages[ 'field' ][ 'select' ] . $messages[ 'tab' ][ 'display' ] . ' > ' . __( 'Fields
|
91 |
}
|
92 |
|
93 |
// Item per page
|
94 |
if ( isset( $dargs[ 'pagination-settings' ] ) ) {
|
95 |
if ( empty( $dargs[ 'pagination-settings' ][ 'items-per-page' ] ) ) {
|
96 |
-
$errors[] = $messages[ 'field' ][ 'text' ] . $messages[ 'tab' ][ 'display' ] . ' > ' . __( 'Pagination
|
97 |
}
|
98 |
}
|
99 |
|
@@ -104,7 +104,7 @@ if ( !class_exists( 'PT_CV_Hooks' ) ) {
|
|
104 |
switch ( $dargs[ 'view-type' ] ) {
|
105 |
case 'grid':
|
106 |
if ( empty( $dargs[ 'number-columns' ] ) ) {
|
107 |
-
$errors[] = $messages[ 'field' ][ 'text' ] . $messages[ 'tab' ][ 'display' ] . ' > ' . __( 'View type
|
108 |
}
|
109 |
break;
|
110 |
}
|
55 |
|
56 |
$messages = array(
|
57 |
'field' => array(
|
58 |
+
'select' => __( 'Please select an option in', 'content-views-query-and-display-post-page' ) . ' : ',
|
59 |
+
'text' => __( 'Please set value in', 'content-views-query-and-display-post-page' ) . ' : ',
|
60 |
),
|
61 |
'tab' => array(
|
62 |
+
'filter' => __( 'Filter Settings', 'content-views-query-and-display-post-page' ),
|
63 |
+
'display' => __( 'Display Settings', 'content-views-query-and-display-post-page' ),
|
64 |
),
|
65 |
);
|
66 |
|
69 |
*/
|
70 |
// Post type
|
71 |
if ( empty( $args[ 'post_type' ] ) ) {
|
72 |
+
$errors[] = $messages[ 'field' ][ 'select' ] . $messages[ 'tab' ][ 'filter' ] . ' > ' . __( 'Content type', 'content-views-query-and-display-post-page' );
|
73 |
}
|
74 |
|
75 |
/**
|
77 |
*/
|
78 |
// View type
|
79 |
if ( empty( $dargs[ 'view-type' ] ) ) {
|
80 |
+
$errors[] = $messages[ 'field' ][ 'select' ] . $messages[ 'tab' ][ 'display' ] . ' > ' . __( 'View type', 'content-views-query-and-display-post-page' );
|
81 |
}
|
82 |
|
83 |
// Layout format
|
84 |
if ( empty( $dargs[ 'layout-format' ] ) ) {
|
85 |
+
$errors[] = $messages[ 'field' ][ 'select' ] . $messages[ 'tab' ][ 'display' ] . ' > ' . __( 'Layout format', 'content-views-query-and-display-post-page' );
|
86 |
}
|
87 |
|
88 |
// Field settings
|
89 |
if ( !isset( $dargs[ 'fields' ] ) ) {
|
90 |
+
$errors[] = $messages[ 'field' ][ 'select' ] . $messages[ 'tab' ][ 'display' ] . ' > ' . __( 'Fields', 'content-views-query-and-display-post-page' ) . ' > ' . __( 'Fields display', 'content-views-query-and-display-post-page' );
|
91 |
}
|
92 |
|
93 |
// Item per page
|
94 |
if ( isset( $dargs[ 'pagination-settings' ] ) ) {
|
95 |
if ( empty( $dargs[ 'pagination-settings' ][ 'items-per-page' ] ) ) {
|
96 |
+
$errors[] = $messages[ 'field' ][ 'text' ] . $messages[ 'tab' ][ 'display' ] . ' > ' . __( 'Pagination', 'content-views-query-and-display-post-page' ) . ' > ' . __( 'Items per page', 'content-views-query-and-display-post-page' );
|
97 |
}
|
98 |
}
|
99 |
|
104 |
switch ( $dargs[ 'view-type' ] ) {
|
105 |
case 'grid':
|
106 |
if ( empty( $dargs[ 'number-columns' ] ) ) {
|
107 |
+
$errors[] = $messages[ 'field' ][ 'text' ] . $messages[ 'tab' ][ 'display' ] . ' > ' . __( 'View type (Layout)', 'content-views-query-and-display-post-page' ) . ' > ' . __( 'Items per row', 'content-views-query-and-display-post-page' );
|
108 |
}
|
109 |
break;
|
110 |
}
|
includes/html-viewtype.php
CHANGED
@@ -103,10 +103,11 @@ if ( !class_exists( 'PT_CV_Html_ViewType' ) ) {
|
|
103 |
$random_id = PT_CV_Functions::string_random();
|
104 |
$idx = 0;
|
105 |
$collapsible_list = array();
|
|
|
106 |
|
107 |
foreach ( $content_items as $post_id => $content_item ) {
|
108 |
// Replace class in body of collapsible item, to show one (now is the first item)
|
109 |
-
$class = ( $idx++ == 0 ) ? 'in' : '';
|
110 |
$content_item = str_replace( PT_CV_PREFIX_UPPER . 'CLASS', $class, $content_item );
|
111 |
$content_item = PT_CV_Html::content_item_wrap( $content_item, 'panel panel-default', $post_id );
|
112 |
|
@@ -251,7 +252,7 @@ if ( !class_exists( 'PT_CV_Html_ViewType' ) ) {
|
|
251 |
$li = array();
|
252 |
for ( $index = 0; $index < $count_slides; $index ++ ) {
|
253 |
$class = ( $index == 0 ) ? 'active' : '';
|
254 |
-
$li[] = sprintf( '<li data-target="#%s" data-
|
255 |
}
|
256 |
|
257 |
$output = '<ol class="' . PT_CV_PREFIX . 'carousel-indicators">' . implode( "\n", $li ) . '</ol>';
|
@@ -274,10 +275,10 @@ if ( !class_exists( 'PT_CV_Html_ViewType' ) ) {
|
|
274 |
$output = '';
|
275 |
if ( $count_slides > 1 ) {
|
276 |
$output = sprintf(
|
277 |
-
'<a class="left carousel-control" href="#%1$s" data-
|
278 |
<span class="glyphicon glyphicon-chevron-left"></span>
|
279 |
</a>
|
280 |
-
<a class="right carousel-control" href="#%1$s" data-
|
281 |
<span class="glyphicon glyphicon-chevron-right"></span>
|
282 |
</a>', esc_attr( $wrapper_id )
|
283 |
);
|
103 |
$random_id = PT_CV_Functions::string_random();
|
104 |
$idx = 0;
|
105 |
$collapsible_list = array();
|
106 |
+
$open_first = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'collapsible-open-first-item' );
|
107 |
|
108 |
foreach ( $content_items as $post_id => $content_item ) {
|
109 |
// Replace class in body of collapsible item, to show one (now is the first item)
|
110 |
+
$class = ( $idx++ == 0 && $open_first === 'yes' ) ? 'in' : '';
|
111 |
$content_item = str_replace( PT_CV_PREFIX_UPPER . 'CLASS', $class, $content_item );
|
112 |
$content_item = PT_CV_Html::content_item_wrap( $content_item, 'panel panel-default', $post_id );
|
113 |
|
252 |
$li = array();
|
253 |
for ( $index = 0; $index < $count_slides; $index ++ ) {
|
254 |
$class = ( $index == 0 ) ? 'active' : '';
|
255 |
+
$li[] = sprintf( '<li data-target="#%s" data-cvslide-to="%s" class="%s"></li>', esc_attr( $wrapper_id ), esc_attr( $index ), $class );
|
256 |
}
|
257 |
|
258 |
$output = '<ol class="' . PT_CV_PREFIX . 'carousel-indicators">' . implode( "\n", $li ) . '</ol>';
|
275 |
$output = '';
|
276 |
if ( $count_slides > 1 ) {
|
277 |
$output = sprintf(
|
278 |
+
'<a class="left carousel-control" href="#%1$s" data-cvslide="prev">
|
279 |
<span class="glyphicon glyphicon-chevron-left"></span>
|
280 |
</a>
|
281 |
+
<a class="right carousel-control" href="#%1$s" data-cvslide="next">
|
282 |
<span class="glyphicon glyphicon-chevron-right"></span>
|
283 |
</a>', esc_attr( $wrapper_id )
|
284 |
);
|
includes/html.php
CHANGED
@@ -76,7 +76,7 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
|
|
76 |
?>
|
77 |
<div class="panel panel-primary pt-accordion">
|
78 |
<div class="panel-heading">
|
79 |
-
<h4 class="panel-title" title="<?php _e( 'Click to toggle',
|
80 |
<a class="pt-accordion-a" data-parent="#<?php echo esc_attr( $parent_id ); ?>" href="#<?php echo esc_attr( $id ); ?>">
|
81 |
<?php echo $heading; ?>
|
82 |
</a>
|
@@ -115,7 +115,7 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
|
|
115 |
* @return type
|
116 |
*/
|
117 |
static function html_loading_img( $dimension = 15, $class = '' ) {
|
118 |
-
$img = sprintf( '<img width="%1$s" height="%1$s" class="%2$s" alt="%3$s" src="%4$s" /><div class="clear %5$s"></div>', esc_attr( $dimension ), esc_attr( $class ), __( '
|
119 |
|
120 |
return apply_filters( PT_CV_PREFIX_ . 'loading_image', $img );
|
121 |
}
|
@@ -246,7 +246,7 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
|
|
246 |
}
|
247 |
|
248 |
static function no_post_found() {
|
249 |
-
return apply_filters( PT_CV_PREFIX_ . 'content_no_post_found_text', __( 'No posts found
|
250 |
}
|
251 |
|
252 |
/**
|
@@ -427,7 +427,7 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
|
|
427 |
// Get post title
|
428 |
$title = get_the_title( $post );
|
429 |
if ( empty( $title ) ) {
|
430 |
-
$title = __( '(no title)',
|
431 |
}
|
432 |
|
433 |
$title = apply_filters( PT_CV_PREFIX_ . 'field_title_result', $title, $fargs, $post->ID );
|
@@ -476,8 +476,10 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
|
|
476 |
|
477 |
// Read more button
|
478 |
if ( apply_filters( PT_CV_PREFIX_ . 'field_content_readmore_enable', 1, $fargs[ 'content' ] ) ) {
|
479 |
-
|
480 |
-
$
|
|
|
|
|
481 |
$readmore_btn .= self::_field_href( $oargs, $post, $text, PT_CV_PREFIX . 'readmore ' . $btn_class );
|
482 |
$readmore_html .= apply_filters( PT_CV_PREFIX_ . 'field_content_readmore_seperated', '<br/>', $fargs ) . $readmore_btn;
|
483 |
}
|
@@ -661,7 +663,7 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
|
|
661 |
|
662 |
// Get terms wrapper class
|
663 |
$term_class = apply_filters( PT_CV_PREFIX_ . 'field_meta_class', 'terms', 'terms' );
|
664 |
-
$prefix_text = apply_filters( PT_CV_PREFIX_ . 'field_meta_prefix_text', __( 'in',
|
665 |
|
666 |
$terms = PT_CV_Functions::post_terms( $post );
|
667 |
if ( !empty( $terms ) ) {
|
@@ -677,7 +679,7 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
|
|
677 |
$prefix_text = apply_filters( PT_CV_PREFIX_ . 'field_meta_prefix_text', '', 'comment' );
|
678 |
|
679 |
ob_start();
|
680 |
-
comments_popup_link(
|
681 |
$comment_content = ob_get_clean();
|
682 |
$comment_html = sprintf( '<span class="%s">%s %s</span>', esc_attr( $comment_class ), $prefix_text, $comment_content );
|
683 |
$html[ 'comment' ] = apply_filters( PT_CV_PREFIX_ . 'field_comment_html', $comment_html, $post );
|
@@ -688,7 +690,7 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
|
|
688 |
|
689 |
// Get author wrapper class
|
690 |
$author_class = apply_filters( PT_CV_PREFIX_ . 'field_meta_class', 'author', 'author' );
|
691 |
-
$prefix_text = apply_filters( PT_CV_PREFIX_ . 'field_meta_prefix_text', __( 'by',
|
692 |
|
693 |
$author_html = sprintf( '<span class="%s">%s <a href="%s" rel="author">%s</a></span>', esc_attr( $author_class ), $prefix_text, esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() );
|
694 |
$html[ 'author' ] = apply_filters( PT_CV_PREFIX_ . 'field_meta_author_html', $author_html, $post );
|
@@ -832,9 +834,7 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
|
|
832 |
* Scripts for Preview & WP frontend
|
833 |
*/
|
834 |
static function frontend_scripts() {
|
835 |
-
|
836 |
-
PT_CV_Asset::enqueue( 'bootstrap' );
|
837 |
-
}
|
838 |
|
839 |
// Public script
|
840 |
PT_CV_Asset::enqueue(
|
@@ -865,12 +865,12 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
|
|
865 |
'prev' => apply_filters( PT_CV_PREFIX_ . 'pagination_prev', '‹' ),
|
866 |
'next' => apply_filters( PT_CV_PREFIX_ . 'pagination_next', '›' ),
|
867 |
'last' => apply_filters( PT_CV_PREFIX_ . 'pagination_last', '»' ),
|
868 |
-
'goto_first' => apply_filters( PT_CV_PREFIX_ . 'goto_first', __( 'Go to first page',
|
869 |
-
'goto_prev' => apply_filters( PT_CV_PREFIX_ . 'goto_prev', __( 'Go to previous page',
|
870 |
-
'goto_next' => apply_filters( PT_CV_PREFIX_ . 'goto_next', __( 'Go to next page',
|
871 |
-
'goto_last' => apply_filters( PT_CV_PREFIX_ . 'goto_last', __( 'Go to last page',
|
872 |
-
'current_page' => apply_filters( PT_CV_PREFIX_ . 'current_page', __( 'Current page is',
|
873 |
-
'goto_page' => apply_filters( PT_CV_PREFIX_ . 'goto_page', __( 'Go to page',
|
874 |
)
|
875 |
);
|
876 |
|
76 |
?>
|
77 |
<div class="panel panel-primary pt-accordion">
|
78 |
<div class="panel-heading">
|
79 |
+
<h4 class="panel-title" title="<?php _e( 'Click to toggle', 'content-views-query-and-display-post-page' ); ?>">
|
80 |
<a class="pt-accordion-a" data-parent="#<?php echo esc_attr( $parent_id ); ?>" href="#<?php echo esc_attr( $id ); ?>">
|
81 |
<?php echo $heading; ?>
|
82 |
</a>
|
115 |
* @return type
|
116 |
*/
|
117 |
static function html_loading_img( $dimension = 15, $class = '' ) {
|
118 |
+
$img = sprintf( '<img width="%1$s" height="%1$s" class="%2$s" alt="%3$s" src="%4$s" /><div class="clear %5$s"></div>', esc_attr( $dimension ), esc_attr( $class ), __( 'Loading…' ), self::loading_img_src(), PT_CV_PREFIX . 'clear-pagination' );
|
119 |
|
120 |
return apply_filters( PT_CV_PREFIX_ . 'loading_image', $img );
|
121 |
}
|
246 |
}
|
247 |
|
248 |
static function no_post_found() {
|
249 |
+
return apply_filters( PT_CV_PREFIX_ . 'content_no_post_found_text', __( 'No posts found.' ) );
|
250 |
}
|
251 |
|
252 |
/**
|
427 |
// Get post title
|
428 |
$title = get_the_title( $post );
|
429 |
if ( empty( $title ) ) {
|
430 |
+
$title = __( '(no title)', 'content-views-query-and-display-post-page' );
|
431 |
}
|
432 |
|
433 |
$title = apply_filters( PT_CV_PREFIX_ . 'field_title_result', $title, $fargs, $post->ID );
|
476 |
|
477 |
// Read more button
|
478 |
if ( apply_filters( PT_CV_PREFIX_ . 'field_content_readmore_enable', 1, $fargs[ 'content' ] ) ) {
|
479 |
+
// Leverage WordPress translation
|
480 |
+
$default_readmore = ucwords( rtrim( __( 'Read more...' ), '.' ) );
|
481 |
+
$text = apply_filters( PT_CV_PREFIX_ . 'field_content_readmore_text', $default_readmore, $fargs[ 'content' ] );
|
482 |
+
$btn_class = apply_filters( PT_CV_PREFIX_ . 'field_content_readmore_class', 'btn btn-success', $fargs );
|
483 |
$readmore_btn .= self::_field_href( $oargs, $post, $text, PT_CV_PREFIX . 'readmore ' . $btn_class );
|
484 |
$readmore_html .= apply_filters( PT_CV_PREFIX_ . 'field_content_readmore_seperated', '<br/>', $fargs ) . $readmore_btn;
|
485 |
}
|
663 |
|
664 |
// Get terms wrapper class
|
665 |
$term_class = apply_filters( PT_CV_PREFIX_ . 'field_meta_class', 'terms', 'terms' );
|
666 |
+
$prefix_text = apply_filters( PT_CV_PREFIX_ . 'field_meta_prefix_text', __( 'in', 'content-views-query-and-display-post-page' ), 'terms' );
|
667 |
|
668 |
$terms = PT_CV_Functions::post_terms( $post );
|
669 |
if ( !empty( $terms ) ) {
|
679 |
$prefix_text = apply_filters( PT_CV_PREFIX_ . 'field_meta_prefix_text', '', 'comment' );
|
680 |
|
681 |
ob_start();
|
682 |
+
comments_popup_link();
|
683 |
$comment_content = ob_get_clean();
|
684 |
$comment_html = sprintf( '<span class="%s">%s %s</span>', esc_attr( $comment_class ), $prefix_text, $comment_content );
|
685 |
$html[ 'comment' ] = apply_filters( PT_CV_PREFIX_ . 'field_comment_html', $comment_html, $post );
|
690 |
|
691 |
// Get author wrapper class
|
692 |
$author_class = apply_filters( PT_CV_PREFIX_ . 'field_meta_class', 'author', 'author' );
|
693 |
+
$prefix_text = apply_filters( PT_CV_PREFIX_ . 'field_meta_prefix_text', __( 'by', 'content-views-query-and-display-post-page' ), 'author' );
|
694 |
|
695 |
$author_html = sprintf( '<span class="%s">%s <a href="%s" rel="author">%s</a></span>', esc_attr( $author_class ), $prefix_text, esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() );
|
696 |
$html[ 'author' ] = apply_filters( PT_CV_PREFIX_ . 'field_meta_author_html', $author_html, $post );
|
834 |
* Scripts for Preview & WP frontend
|
835 |
*/
|
836 |
static function frontend_scripts() {
|
837 |
+
PT_CV_Asset::enqueue( 'bootstrap' );
|
|
|
|
|
838 |
|
839 |
// Public script
|
840 |
PT_CV_Asset::enqueue(
|
865 |
'prev' => apply_filters( PT_CV_PREFIX_ . 'pagination_prev', '‹' ),
|
866 |
'next' => apply_filters( PT_CV_PREFIX_ . 'pagination_next', '›' ),
|
867 |
'last' => apply_filters( PT_CV_PREFIX_ . 'pagination_last', '»' ),
|
868 |
+
'goto_first' => apply_filters( PT_CV_PREFIX_ . 'goto_first', __( 'Go to first page', 'content-views-query-and-display-post-page' ) ),
|
869 |
+
'goto_prev' => apply_filters( PT_CV_PREFIX_ . 'goto_prev', __( 'Go to previous page', 'content-views-query-and-display-post-page' ) ),
|
870 |
+
'goto_next' => apply_filters( PT_CV_PREFIX_ . 'goto_next', __( 'Go to next page', 'content-views-query-and-display-post-page' ) ),
|
871 |
+
'goto_last' => apply_filters( PT_CV_PREFIX_ . 'goto_last', __( 'Go to last page', 'content-views-query-and-display-post-page' ) ),
|
872 |
+
'current_page' => apply_filters( PT_CV_PREFIX_ . 'current_page', __( 'Current page is', 'content-views-query-and-display-post-page' ) ),
|
873 |
+
'goto_page' => apply_filters( PT_CV_PREFIX_ . 'goto_page', __( 'Go to page', 'content-views-query-and-display-post-page' ) ),
|
874 |
)
|
875 |
);
|
876 |
|
includes/settings.php
CHANGED
@@ -39,7 +39,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
39 |
// Select term to filter
|
40 |
array(
|
41 |
'label' => array(
|
42 |
-
'text' => __( 'Select terms',
|
43 |
),
|
44 |
'params' => array(
|
45 |
array(
|
@@ -55,7 +55,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
55 |
//Operator
|
56 |
array(
|
57 |
'label' => array(
|
58 |
-
'text' => __( 'Operator',
|
59 |
),
|
60 |
'params' => array(
|
61 |
array(
|
@@ -85,7 +85,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
85 |
// Order By
|
86 |
array(
|
87 |
'label' => array(
|
88 |
-
'text' => __( '
|
89 |
),
|
90 |
'params' => array(
|
91 |
array(
|
@@ -99,7 +99,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
99 |
// Order
|
100 |
apply_filters( PT_CV_PREFIX_ . 'orders', array(
|
101 |
'label' => array(
|
102 |
-
'text' => __( 'Order'
|
103 |
),
|
104 |
'params' => array(
|
105 |
array(
|
@@ -129,14 +129,19 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
129 |
$result = array(
|
130 |
// Pagination
|
131 |
array(
|
132 |
-
'label'
|
133 |
-
'text' =>
|
134 |
),
|
135 |
-
'
|
|
|
|
|
|
|
|
|
|
|
136 |
array(
|
137 |
'type' => 'checkbox',
|
138 |
'name' => 'enable-pagination',
|
139 |
-
'options' => PT_CV_Values::yes_no( 'yes', __( 'Enable'
|
140 |
'std' => '',
|
141 |
),
|
142 |
),
|
@@ -144,7 +149,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
144 |
// Items per page
|
145 |
array(
|
146 |
'label' => array(
|
147 |
-
'text' => __( 'Items per page',
|
148 |
),
|
149 |
'extra_setting' => array(
|
150 |
'params' => array(
|
@@ -157,7 +162,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
157 |
'name' => $prefix . 'items-per-page',
|
158 |
'std' => '5',
|
159 |
'placeholder' => 'for example: 5',
|
160 |
-
'desc' => __( 'If value of
|
161 |
),
|
162 |
),
|
163 |
'dependence' => array( 'enable-pagination', 'yes' ),
|
@@ -165,7 +170,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
165 |
// Pagination Type
|
166 |
array(
|
167 |
'label' => array(
|
168 |
-
'text' => __( 'Type'
|
169 |
),
|
170 |
'params' => array(
|
171 |
array(
|
@@ -193,7 +198,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
193 |
'params' => array(
|
194 |
array(
|
195 |
'label' => array(
|
196 |
-
'text' => __( 'Style',
|
197 |
),
|
198 |
'params' => array(
|
199 |
array(
|
@@ -228,7 +233,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
228 |
// Open an item in
|
229 |
array(
|
230 |
'label' => array(
|
231 |
-
'text' => __( 'Open item in',
|
232 |
),
|
233 |
'params' => array(
|
234 |
array(
|
@@ -236,7 +241,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
236 |
'name' => $prefix . 'open-in',
|
237 |
'options' => PT_CV_Values::open_in(),
|
238 |
'std' => PT_CV_Functions::array_get_first_key( PT_CV_Values::open_in() ),
|
239 |
-
'desc' => __( 'How to open item when click on Title, Thumbnail, Read-more button',
|
240 |
),
|
241 |
),
|
242 |
),
|
@@ -275,13 +280,13 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
275 |
),
|
276 |
),
|
277 |
// Upgrade to Pro: Drag & Drop
|
278 |
-
!get_option( 'pt_cv_version_pro' ) ? PT_CV_Settings::get_cvpro( __( 'Change display order (for example: show Title above Thumbnail)',
|
279 |
// Title settings
|
280 |
apply_filters( PT_CV_PREFIX_ . 'settings_title_display', array(), $prefix, $prefix2 ),
|
281 |
// Thumbnail settings
|
282 |
array(
|
283 |
'label' => array(
|
284 |
-
'text' => __( 'Thumbnail
|
285 |
),
|
286 |
'extra_setting' => array(
|
287 |
'params' => array(
|
@@ -300,7 +305,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
300 |
// Content settings
|
301 |
array(
|
302 |
'label' => array(
|
303 |
-
'text' => __( 'Content
|
304 |
),
|
305 |
'extra_setting' => array(
|
306 |
'params' => array(
|
@@ -312,8 +317,8 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
312 |
'type' => 'radio',
|
313 |
'name' => $prefix . 'content-show',
|
314 |
'options' => array(
|
315 |
-
'full' => __( 'Show Full Content',
|
316 |
-
'excerpt' => __( 'Show Excerpt',
|
317 |
),
|
318 |
'std' => 'excerpt',
|
319 |
),
|
@@ -327,6 +332,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
327 |
),
|
328 |
'extra_setting' => array(
|
329 |
'params' => array(
|
|
|
330 |
'group-class' => PT_CV_PREFIX . 'field-setting' . ' ' . PT_CV_PREFIX . 'excerpt-setting',
|
331 |
'wrap-id' => PT_CV_Html::html_group_id( 'excerpt-settings' ),
|
332 |
),
|
@@ -334,50 +340,68 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
334 |
'params' => array(
|
335 |
array(
|
336 |
'type' => 'group',
|
337 |
-
'params' =>
|
338 |
-
PT_CV_PREFIX_ . 'excerpt_settings', array(
|
339 |
-
// Excerpt length
|
340 |
array(
|
341 |
-
'label'
|
342 |
-
'text' =>
|
343 |
),
|
344 |
-
'
|
345 |
-
array(
|
346 |
-
'
|
347 |
-
'name' => $prefix . 'excerpt-length',
|
348 |
-
'std' => '20',
|
349 |
-
'placeholder' => 'for example: 20',
|
350 |
-
'append_text' => 'words',
|
351 |
-
'desc' => __( 'Generate excerpt by selecting the first X words of post content', PT_CV_TEXTDOMAIN ),
|
352 |
),
|
353 |
),
|
354 |
-
|
355 |
-
// Upgrade to Pro: Manual excerpt
|
356 |
-
!get_option( 'pt_cv_version_pro' ) ? PT_CV_Settings::get_cvpro( __( 'Use manual excerpt, change <code>Read More</code> text', PT_CV_TEXTDOMAIN ) ) : '',
|
357 |
-
// Allow HTML tags
|
358 |
-
array(
|
359 |
-
'label' => array(
|
360 |
-
'text' => '',
|
361 |
-
),
|
362 |
-
'params' => array(
|
363 |
array(
|
364 |
-
'type'
|
365 |
-
'
|
366 |
-
|
367 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
),
|
369 |
),
|
|
|
370 |
),
|
371 |
-
), $prefix . 'excerpt-'
|
372 |
),
|
373 |
),
|
374 |
),
|
375 |
-
'dependence' => array(
|
376 |
),
|
377 |
// Meta fields settings
|
378 |
array(
|
379 |
'label' => array(
|
380 |
-
'text' => __( 'Meta fields
|
381 |
),
|
382 |
'extra_setting' => array(
|
383 |
'params' => array(
|
@@ -449,11 +473,12 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
449 |
// Thumbnail position
|
450 |
array(
|
451 |
'label' => array(
|
452 |
-
'text' => __( 'Thumbnail position',
|
453 |
),
|
454 |
'extra_setting' => array(
|
455 |
'params' => array(
|
456 |
-
'
|
|
|
457 |
),
|
458 |
),
|
459 |
'params' => array(
|
@@ -480,7 +505,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
480 |
array(
|
481 |
'type' => 'checkbox',
|
482 |
'name' => $prefix . 'thumbnail',
|
483 |
-
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Thumbnail',
|
484 |
'std' => 'yes',
|
485 |
),
|
486 |
),
|
@@ -500,7 +525,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
500 |
array(
|
501 |
'type' => 'checkbox',
|
502 |
'name' => $prefix . 'title',
|
503 |
-
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Title',
|
504 |
'std' => 'yes',
|
505 |
),
|
506 |
),
|
@@ -519,7 +544,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
519 |
array(
|
520 |
'type' => 'checkbox',
|
521 |
'name' => $prefix . 'content',
|
522 |
-
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Content',
|
523 |
'std' => 'yes',
|
524 |
),
|
525 |
),
|
@@ -538,7 +563,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
538 |
array(
|
539 |
'type' => 'checkbox',
|
540 |
'name' => $prefix . 'meta-fields',
|
541 |
-
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Meta Fields (
|
542 |
'std' => '',
|
543 |
),
|
544 |
),
|
@@ -563,7 +588,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
563 |
// Size
|
564 |
array(
|
565 |
'label' => array(
|
566 |
-
'text' => __( 'Size'
|
567 |
),
|
568 |
'params' => array(
|
569 |
array(
|
@@ -589,14 +614,14 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
589 |
array(
|
590 |
'type' => 'checkbox',
|
591 |
'name' => $prefix . 'thumbnail-nowprpi',
|
592 |
-
'options' => PT_CV_Values::yes_no( 'yes', __( 'Disable responsive image of WordPress 4.4',
|
593 |
'std' => '',
|
594 |
-
'desc' => __( 'Check this option if thumbnail looks blurry',
|
595 |
),
|
596 |
),
|
597 |
),
|
598 |
// Upgrade to Pro: Show image/video in content as thumbnail
|
599 |
-
!get_option( 'pt_cv_version_pro' ) ? PT_CV_Settings::get_cvpro( sprintf( __( 'In this lite version,
|
600 |
);
|
601 |
|
602 |
$result = apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_settings', $result, $prefix );
|
@@ -624,7 +649,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
624 |
array(
|
625 |
'type' => 'checkbox',
|
626 |
'name' => $prefix . 'date',
|
627 |
-
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Date',
|
628 |
'std' => 'yes',
|
629 |
),
|
630 |
),
|
@@ -643,7 +668,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
643 |
array(
|
644 |
'type' => 'checkbox',
|
645 |
'name' => $prefix . 'author',
|
646 |
-
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Author',
|
647 |
'std' => '',
|
648 |
),
|
649 |
),
|
@@ -662,7 +687,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
662 |
array(
|
663 |
'type' => 'checkbox',
|
664 |
'name' => $prefix . 'taxonomy',
|
665 |
-
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Taxonomies (
|
666 |
'std' => 'yes',
|
667 |
),
|
668 |
),
|
@@ -682,7 +707,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
682 |
array(
|
683 |
'type' => 'checkbox',
|
684 |
'name' => $prefix . 'comment',
|
685 |
-
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Comment Count',
|
686 |
'std' => '',
|
687 |
),
|
688 |
),
|
@@ -708,7 +733,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
708 |
// Number of columns
|
709 |
array(
|
710 |
'label' => array(
|
711 |
-
'text' => __( 'Items per row',
|
712 |
),
|
713 |
'params' => array(
|
714 |
array(
|
@@ -733,14 +758,29 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
733 |
* @return array
|
734 |
*/
|
735 |
static function view_type_settings_collapsible() {
|
736 |
-
|
737 |
-
$
|
738 |
-
|
739 |
-
|
740 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
741 |
);
|
742 |
|
743 |
-
|
744 |
|
745 |
return $result;
|
746 |
}
|
@@ -769,8 +809,8 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
769 |
* @return array
|
770 |
*/
|
771 |
static function setting_no_option( $only_text = false ) {
|
772 |
-
$msg = !get_option( 'pt_cv_version_pro' ) ? '
|
773 |
-
$class = PT_CV_PREFIX . 'text';
|
774 |
$text = "<div class='$class' style='color:#999'>$msg</div>";
|
775 |
|
776 |
return $only_text ? $text : array(
|
@@ -801,7 +841,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
801 |
* @return string
|
802 |
*/
|
803 |
static function get_cvpro( $text, $width = 10, $style = '', $notice = false ) {
|
804 |
-
$url = sprintf( ' » <a href="%s" target="_blank">%s</a>', esc_url( 'http://www.contentviewspro.com/pricing/?utm_source=client&utm_medium=view' ), __( 'Get CVPro',
|
805 |
|
806 |
return array(
|
807 |
'label' => array(
|
@@ -816,7 +856,7 @@ if ( !class_exists( 'PT_CV_Settings' ) ) {
|
|
816 |
array(
|
817 |
'type' => 'html',
|
818 |
'content' => $notice ?
|
819 |
-
sprintf( '<div class="alert alert-warning"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a><strong>%s:</strong> %s</div>', __( 'Notice',
|
820 |
sprintf( '<p class="text-muted" style="%s">→ %s</p>', $style, $text . $url ),
|
821 |
),
|
822 |
),
|
39 |
// Select term to filter
|
40 |
array(
|
41 |
'label' => array(
|
42 |
+
'text' => __( 'Select terms', 'content-views-query-and-display-post-page' ),
|
43 |
),
|
44 |
'params' => array(
|
45 |
array(
|
55 |
//Operator
|
56 |
array(
|
57 |
'label' => array(
|
58 |
+
'text' => __( 'Operator', 'content-views-query-and-display-post-page' ),
|
59 |
),
|
60 |
'params' => array(
|
61 |
array(
|
85 |
// Order By
|
86 |
array(
|
87 |
'label' => array(
|
88 |
+
'text' => __( 'Sort by', 'content-views-query-and-display-post-page' ),
|
89 |
),
|
90 |
'params' => array(
|
91 |
array(
|
99 |
// Order
|
100 |
apply_filters( PT_CV_PREFIX_ . 'orders', array(
|
101 |
'label' => array(
|
102 |
+
'text' => __( 'Order' ),
|
103 |
),
|
104 |
'params' => array(
|
105 |
array(
|
129 |
$result = array(
|
130 |
// Pagination
|
131 |
array(
|
132 |
+
'label' => array(
|
133 |
+
'text' => '',
|
134 |
),
|
135 |
+
'extra_setting' => array(
|
136 |
+
'params' => array(
|
137 |
+
'width' => 12,
|
138 |
+
),
|
139 |
+
),
|
140 |
+
'params' => array(
|
141 |
array(
|
142 |
'type' => 'checkbox',
|
143 |
'name' => 'enable-pagination',
|
144 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Enable' ) ),
|
145 |
'std' => '',
|
146 |
),
|
147 |
),
|
149 |
// Items per page
|
150 |
array(
|
151 |
'label' => array(
|
152 |
+
'text' => __( 'Items per page', 'content-views-query-and-display-post-page' ),
|
153 |
),
|
154 |
'extra_setting' => array(
|
155 |
'params' => array(
|
162 |
'name' => $prefix . 'items-per-page',
|
163 |
'std' => '5',
|
164 |
'placeholder' => 'for example: 5',
|
165 |
+
'desc' => sprintf( __( 'If value of %s setting is not empty, this value should be smaller than that', 'content-views-query-and-display-post-page' ), sprintf( '<code>%s</code>', __( 'Limit', 'content-views-query-and-display-post-page' ) ) ),
|
166 |
),
|
167 |
),
|
168 |
'dependence' => array( 'enable-pagination', 'yes' ),
|
170 |
// Pagination Type
|
171 |
array(
|
172 |
'label' => array(
|
173 |
+
'text' => __( 'Type' ),
|
174 |
),
|
175 |
'params' => array(
|
176 |
array(
|
198 |
'params' => array(
|
199 |
array(
|
200 |
'label' => array(
|
201 |
+
'text' => __( 'Style', 'content-views-query-and-display-post-page' ),
|
202 |
),
|
203 |
'params' => array(
|
204 |
array(
|
233 |
// Open an item in
|
234 |
array(
|
235 |
'label' => array(
|
236 |
+
'text' => __( 'Open item in', 'content-views-query-and-display-post-page' ),
|
237 |
),
|
238 |
'params' => array(
|
239 |
array(
|
241 |
'name' => $prefix . 'open-in',
|
242 |
'options' => PT_CV_Values::open_in(),
|
243 |
'std' => PT_CV_Functions::array_get_first_key( PT_CV_Values::open_in() ),
|
244 |
+
'desc' => __( 'How to open item when click on Title, Thumbnail, Read-more button', 'content-views-query-and-display-post-page' ),
|
245 |
),
|
246 |
),
|
247 |
),
|
280 |
),
|
281 |
),
|
282 |
// Upgrade to Pro: Drag & Drop
|
283 |
+
!get_option( 'pt_cv_version_pro' ) ? PT_CV_Settings::get_cvpro( __( 'Change display order (for example: show Title above Thumbnail)', 'content-views-query-and-display-post-page' ), 12, 'margin-top: -15px; margin-bottom: 5px;' ) : '',
|
284 |
// Title settings
|
285 |
apply_filters( PT_CV_PREFIX_ . 'settings_title_display', array(), $prefix, $prefix2 ),
|
286 |
// Thumbnail settings
|
287 |
array(
|
288 |
'label' => array(
|
289 |
+
'text' => __( 'Thumbnail' ),
|
290 |
),
|
291 |
'extra_setting' => array(
|
292 |
'params' => array(
|
305 |
// Content settings
|
306 |
array(
|
307 |
'label' => array(
|
308 |
+
'text' => __( 'Content' ),
|
309 |
),
|
310 |
'extra_setting' => array(
|
311 |
'params' => array(
|
317 |
'type' => 'radio',
|
318 |
'name' => $prefix . 'content-show',
|
319 |
'options' => array(
|
320 |
+
'full' => __( 'Show Full Content', 'content-views-query-and-display-post-page' ),
|
321 |
+
'excerpt' => __( 'Show Excerpt', 'content-views-query-and-display-post-page' ),
|
322 |
),
|
323 |
'std' => 'excerpt',
|
324 |
),
|
332 |
),
|
333 |
'extra_setting' => array(
|
334 |
'params' => array(
|
335 |
+
'width' => 12,
|
336 |
'group-class' => PT_CV_PREFIX . 'field-setting' . ' ' . PT_CV_PREFIX . 'excerpt-setting',
|
337 |
'wrap-id' => PT_CV_Html::html_group_id( 'excerpt-settings' ),
|
338 |
),
|
340 |
'params' => array(
|
341 |
array(
|
342 |
'type' => 'group',
|
343 |
+
'params' => array(
|
|
|
|
|
344 |
array(
|
345 |
+
'label' => array(
|
346 |
+
'text' => '',
|
347 |
),
|
348 |
+
'extra_setting' => array(
|
349 |
+
'params' => array(
|
350 |
+
'width' => 12,
|
|
|
|
|
|
|
|
|
|
|
351 |
),
|
352 |
),
|
353 |
+
'params' => array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
array(
|
355 |
+
'type' => 'group',
|
356 |
+
'params' => apply_filters(
|
357 |
+
PT_CV_PREFIX_ . 'excerpt_settings', array(
|
358 |
+
// Excerpt length
|
359 |
+
array(
|
360 |
+
'label' => array(
|
361 |
+
'text' => __( 'Excerpt settings', 'content-views-query-and-display-post-page' ),
|
362 |
+
),
|
363 |
+
'params' => array(
|
364 |
+
array(
|
365 |
+
'type' => 'number',
|
366 |
+
'name' => $prefix . 'excerpt-length',
|
367 |
+
'std' => '20',
|
368 |
+
'placeholder' => 'for example: 20',
|
369 |
+
'append_text' => 'words',
|
370 |
+
'desc' => __( 'Generate excerpt by selecting the first X words of post content', 'content-views-query-and-display-post-page' ),
|
371 |
+
),
|
372 |
+
),
|
373 |
+
),
|
374 |
+
// Upgrade to Pro: Manual excerpt
|
375 |
+
!get_option( 'pt_cv_version_pro' ) ? PT_CV_Settings::get_cvpro( __( 'Use manual excerpt, change "Read More" text', 'content-views-query-and-display-post-page' ) ) : '',
|
376 |
+
// Allow HTML tags
|
377 |
+
array(
|
378 |
+
'label' => array(
|
379 |
+
'text' => '',
|
380 |
+
),
|
381 |
+
'params' => array(
|
382 |
+
array(
|
383 |
+
'type' => 'checkbox',
|
384 |
+
'name' => $prefix . 'excerpt-allow_html',
|
385 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Allow HTML tags (a, br, strong, em, strike, i, ul, ol, li) in excerpt', 'content-views-query-and-display-post-page' ) ),
|
386 |
+
'std' => '',
|
387 |
+
),
|
388 |
+
),
|
389 |
+
),
|
390 |
+
), $prefix . 'excerpt-'
|
391 |
+
),
|
392 |
),
|
393 |
),
|
394 |
+
'dependence' => array( $prefix . 'content-show', 'excerpt' ),
|
395 |
),
|
|
|
396 |
),
|
397 |
),
|
398 |
),
|
399 |
+
'dependence' => array( $prefix2 . 'content', 'yes' ),
|
400 |
),
|
401 |
// Meta fields settings
|
402 |
array(
|
403 |
'label' => array(
|
404 |
+
'text' => __( 'Meta fields', 'content-views-query-and-display-post-page' ),
|
405 |
),
|
406 |
'extra_setting' => array(
|
407 |
'params' => array(
|
473 |
// Thumbnail position
|
474 |
array(
|
475 |
'label' => array(
|
476 |
+
'text' => __( 'Thumbnail position', 'content-views-query-and-display-post-page' ),
|
477 |
),
|
478 |
'extra_setting' => array(
|
479 |
'params' => array(
|
480 |
+
'group-class' => PT_CV_PREFIX . 'thumb-position',
|
481 |
+
'wrap-class' => PT_CV_PREFIX . 'w200',
|
482 |
),
|
483 |
),
|
484 |
'params' => array(
|
505 |
array(
|
506 |
'type' => 'checkbox',
|
507 |
'name' => $prefix . 'thumbnail',
|
508 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Thumbnail', 'content-views-query-and-display-post-page' ) ),
|
509 |
'std' => 'yes',
|
510 |
),
|
511 |
),
|
525 |
array(
|
526 |
'type' => 'checkbox',
|
527 |
'name' => $prefix . 'title',
|
528 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Title', 'content-views-query-and-display-post-page' ) ),
|
529 |
'std' => 'yes',
|
530 |
),
|
531 |
),
|
544 |
array(
|
545 |
'type' => 'checkbox',
|
546 |
'name' => $prefix . 'content',
|
547 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Content', 'content-views-query-and-display-post-page' ) ),
|
548 |
'std' => 'yes',
|
549 |
),
|
550 |
),
|
563 |
array(
|
564 |
'type' => 'checkbox',
|
565 |
'name' => $prefix . 'meta-fields',
|
566 |
+
'options' => PT_CV_Values::yes_no( 'yes', sprintf( '%s (%s, %s, %s, %s)', __( 'Show Meta Fields', 'content-views-query-and-display-post-page' ), __( 'Taxonomy', 'content-views-query-and-display-post-page' ), __( 'Author' ), __( 'Date' ), __( 'Comment' ) ) ),
|
567 |
'std' => '',
|
568 |
),
|
569 |
),
|
588 |
// Size
|
589 |
array(
|
590 |
'label' => array(
|
591 |
+
'text' => __( 'Size' ),
|
592 |
),
|
593 |
'params' => array(
|
594 |
array(
|
614 |
array(
|
615 |
'type' => 'checkbox',
|
616 |
'name' => $prefix . 'thumbnail-nowprpi',
|
617 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Disable responsive image of WordPress 4.4', 'content-views-query-and-display-post-page' ) ),
|
618 |
'std' => '',
|
619 |
+
'desc' => __( 'Check this option if thumbnail looks blurry', 'content-views-query-and-display-post-page' ),
|
620 |
),
|
621 |
),
|
622 |
),
|
623 |
// Upgrade to Pro: Show image/video in content as thumbnail
|
624 |
+
!get_option( 'pt_cv_version_pro' ) ? PT_CV_Settings::get_cvpro( sprintf( __( 'In this lite version, thumbnail is only shown if post has %s', 'content-views-query-and-display-post-page' ), sprintf( '<a target="_blank" href="https://codex.wordpress.org/Post_Thumbnails">%s</a>', __( 'Featured Image' ) ) ), 10, null, true ) : '',
|
625 |
);
|
626 |
|
627 |
$result = apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_settings', $result, $prefix );
|
649 |
array(
|
650 |
'type' => 'checkbox',
|
651 |
'name' => $prefix . 'date',
|
652 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Date', 'content-views-query-and-display-post-page' ) ),
|
653 |
'std' => 'yes',
|
654 |
),
|
655 |
),
|
668 |
array(
|
669 |
'type' => 'checkbox',
|
670 |
'name' => $prefix . 'author',
|
671 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Author', 'content-views-query-and-display-post-page' ) ),
|
672 |
'std' => '',
|
673 |
),
|
674 |
),
|
687 |
array(
|
688 |
'type' => 'checkbox',
|
689 |
'name' => $prefix . 'taxonomy',
|
690 |
+
'options' => PT_CV_Values::yes_no( 'yes', sprintf( __( 'Show Taxonomies (%s, %s...)', 'content-views-query-and-display-post-page' ), __( 'Categories' ), __( 'Tags' ) ) ),
|
691 |
'std' => 'yes',
|
692 |
),
|
693 |
),
|
707 |
array(
|
708 |
'type' => 'checkbox',
|
709 |
'name' => $prefix . 'comment',
|
710 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Show Comment Count', 'content-views-query-and-display-post-page' ) ),
|
711 |
'std' => '',
|
712 |
),
|
713 |
),
|
733 |
// Number of columns
|
734 |
array(
|
735 |
'label' => array(
|
736 |
+
'text' => __( 'Items per row', 'content-views-query-and-display-post-page' ),
|
737 |
),
|
738 |
'params' => array(
|
739 |
array(
|
758 |
* @return array
|
759 |
*/
|
760 |
static function view_type_settings_collapsible() {
|
761 |
+
$prefix = 'collapsible-';
|
762 |
+
$result = array(
|
763 |
+
array(
|
764 |
+
'label' => array(
|
765 |
+
'text' => '',
|
766 |
+
),
|
767 |
+
'extra_setting' => array(
|
768 |
+
'params' => array(
|
769 |
+
'width' => 12,
|
770 |
+
),
|
771 |
+
),
|
772 |
+
'params' => array(
|
773 |
+
array(
|
774 |
+
'type' => 'checkbox',
|
775 |
+
'name' => $prefix . 'open-first-item',
|
776 |
+
'options' => PT_CV_Values::yes_no( 'yes', __( 'Open first item by default', 'content-views-query-and-display-post-page' ) ),
|
777 |
+
'std' => 'yes',
|
778 |
+
),
|
779 |
+
),
|
780 |
+
),
|
781 |
);
|
782 |
|
783 |
+
#$result = apply_filters( PT_CV_PREFIX_ . 'view_type_settings_collapsible', $result );
|
784 |
|
785 |
return $result;
|
786 |
}
|
809 |
* @return array
|
810 |
*/
|
811 |
static function setting_no_option( $only_text = false ) {
|
812 |
+
$msg = !get_option( 'pt_cv_version_pro' ) ? '' : __( 'There is no option', 'content-views-query-and-display-post-page' );
|
813 |
+
$class = PT_CV_PREFIX . 'text cv-noop-profe';
|
814 |
$text = "<div class='$class' style='color:#999'>$msg</div>";
|
815 |
|
816 |
return $only_text ? $text : array(
|
841 |
* @return string
|
842 |
*/
|
843 |
static function get_cvpro( $text, $width = 10, $style = '', $notice = false ) {
|
844 |
+
$url = sprintf( ' » <a href="%s" target="_blank">%s</a>', esc_url( 'http://www.contentviewspro.com/pricing/?utm_source=client&utm_medium=view' ), __( 'Get CVPro', 'content-views-query-and-display-post-page' ) );
|
845 |
|
846 |
return array(
|
847 |
'label' => array(
|
856 |
array(
|
857 |
'type' => 'html',
|
858 |
'content' => $notice ?
|
859 |
+
sprintf( '<div class="alert alert-warning"><a href="#" class="close" data-dismiss="alert" aria-label="close">×</a><strong>%s:</strong> %s</div>', __( 'Notice', 'content-views-query-and-display-post-page' ), $text . '.' ) :
|
860 |
sprintf( '<p class="text-muted" style="%s">→ %s</p>', $style, $text . $url ),
|
861 |
),
|
862 |
),
|
includes/values.php
CHANGED
@@ -16,7 +16,6 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
16 |
* @todo Define values for input, select...
|
17 |
*/
|
18 |
class PT_CV_Values {
|
19 |
-
|
20 |
/**
|
21 |
* Get Post Types
|
22 |
*
|
@@ -36,7 +35,7 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
36 |
if ( in_array( $post_type->name, $excludes ) ) {
|
37 |
continue;
|
38 |
}
|
39 |
-
$result[ $post_type->name ] =
|
40 |
}
|
41 |
|
42 |
$result = apply_filters( PT_CV_PREFIX_ . 'post_types_list', $result );
|
@@ -79,7 +78,7 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
79 |
$taxonomies = get_taxonomies( $args, 'objects' );
|
80 |
|
81 |
foreach ( $taxonomies as $taxonomy ) {
|
82 |
-
$result[ $taxonomy->name ] =
|
83 |
}
|
84 |
|
85 |
return $result;
|
@@ -92,8 +91,8 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
92 |
*/
|
93 |
static function taxonomy_relation() {
|
94 |
return array(
|
95 |
-
'AND' => __( 'AND',
|
96 |
-
'OR' => __( 'OR',
|
97 |
);
|
98 |
}
|
99 |
|
@@ -103,9 +102,9 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
103 |
*/
|
104 |
static function taxonomy_operators() {
|
105 |
return array(
|
106 |
-
'IN' => __( 'IN',
|
107 |
-
'NOT IN' => __( 'NOT IN',
|
108 |
-
'AND' => __( 'AND',
|
109 |
);
|
110 |
}
|
111 |
|
@@ -143,7 +142,7 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
143 |
$result = $data->$info;
|
144 |
} else {
|
145 |
if ( isset( $data->labels->$info ) ) {
|
146 |
-
$result =
|
147 |
}
|
148 |
}
|
149 |
|
@@ -179,8 +178,8 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
179 |
*/
|
180 |
static function yes_no( $key = '', $value = '' ) {
|
181 |
$result = array(
|
182 |
-
'yes' => __( 'Yes',
|
183 |
-
'no' => __( 'No',
|
184 |
);
|
185 |
if ( !empty( $key ) ) {
|
186 |
return array( $key => empty( $value ) ? $result[ $key ] : $value );
|
@@ -196,8 +195,8 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
196 |
*/
|
197 |
static function show_hide() {
|
198 |
return array(
|
199 |
-
'show' => __( 'Show',
|
200 |
-
'hide' => __( 'Hide',
|
201 |
);
|
202 |
}
|
203 |
|
@@ -208,8 +207,8 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
208 |
*/
|
209 |
static function pagination_types() {
|
210 |
$result = array(
|
211 |
-
'ajax' => __( 'Ajax',
|
212 |
-
'normal' => __( 'Normal',
|
213 |
);
|
214 |
|
215 |
$result = apply_filters( PT_CV_PREFIX_ . 'pagination_types', $result );
|
@@ -224,7 +223,7 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
224 |
*/
|
225 |
static function pagination_styles() {
|
226 |
$result = array(
|
227 |
-
'regular' => __( 'Numbered pagination',
|
228 |
);
|
229 |
|
230 |
$result = apply_filters( PT_CV_PREFIX_ . 'pagination_styles', $result );
|
@@ -239,8 +238,8 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
239 |
*/
|
240 |
static function orders() {
|
241 |
return array(
|
242 |
-
'asc' => __( 'Ascending'
|
243 |
-
'desc' => __( 'Descending'
|
244 |
);
|
245 |
}
|
246 |
|
@@ -249,14 +248,13 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
249 |
*/
|
250 |
static function post_statuses() {
|
251 |
return array(
|
252 |
-
'publish' => __( '
|
253 |
-
'pending' => __( 'Pending'
|
254 |
-
'draft' => __( 'Draft'
|
255 |
-
'
|
256 |
-
'
|
257 |
-
'
|
258 |
-
'inherit' => __( 'Inherit',
|
259 |
-
'trash' => __( 'Trash', PT_CV_TEXTDOMAIN ),
|
260 |
);
|
261 |
}
|
262 |
|
@@ -268,11 +266,11 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
268 |
static function advanced_settings() {
|
269 |
return apply_filters(
|
270 |
PT_CV_PREFIX_ . 'advanced_settings', array(
|
271 |
-
'taxonomy' => __( 'Taxonomy (
|
272 |
-
'status' => __( 'Status'
|
273 |
-
'order' => __( '
|
274 |
-
'search' => __( '
|
275 |
-
'author' => __( 'Author'
|
276 |
)
|
277 |
);
|
278 |
}
|
@@ -286,7 +284,7 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
286 |
$field_name = PT_CV_PREFIX . $name;
|
287 |
$selected = isset( $data[ $field_name ] ) ? $data[ $field_name ] : '';
|
288 |
|
289 |
-
return wp_dropdown_users( array( 'name' => $field_name, 'selected' => $selected, 'class' => 'form-control', 'show_option_none' =>
|
290 |
}
|
291 |
|
292 |
/**
|
@@ -321,11 +319,11 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
321 |
*/
|
322 |
static function post_regular_orderby() {
|
323 |
$regular_orderby = array(
|
324 |
-
'' =>
|
325 |
-
'ID' => __( 'ID',
|
326 |
-
'title' => __( 'Title'
|
327 |
-
'date' => __( 'Created date',
|
328 |
-
'modified' => __( 'Modified date',
|
329 |
);
|
330 |
|
331 |
$result = apply_filters( PT_CV_PREFIX_ . 'regular_orderby', $regular_orderby );
|
@@ -341,9 +339,9 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
341 |
static function view_type() {
|
342 |
|
343 |
$view_type = array(
|
344 |
-
'grid' => __( 'Grid',
|
345 |
-
'collapsible' => __( 'Collapsible List',
|
346 |
-
'scrollable' => __( 'Scrollable List',
|
347 |
);
|
348 |
|
349 |
$result = apply_filters( PT_CV_PREFIX_ . 'view_type', $view_type );
|
@@ -382,8 +380,8 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
382 |
static function layout_format() {
|
383 |
|
384 |
$result = array(
|
385 |
-
'1-col' => __( '1 column
|
386 |
-
'2-col' => __( '2 columns
|
387 |
);
|
388 |
|
389 |
$result = apply_filters( PT_CV_PREFIX_ . 'layout_format', $result );
|
@@ -397,8 +395,8 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
397 |
static function open_in() {
|
398 |
|
399 |
$open_in = array(
|
400 |
-
'_self' => __( 'Current tab',
|
401 |
-
'_blank' => __( 'New tab',
|
402 |
);
|
403 |
|
404 |
$result = apply_filters( PT_CV_PREFIX_ . 'open_in', $open_in );
|
@@ -446,7 +444,7 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
446 |
}
|
447 |
}
|
448 |
// Add full sizes
|
449 |
-
$result[ 'full' ] = __( 'Full
|
450 |
|
451 |
// Sort custom sizes by index (width * height)
|
452 |
krsort( $dimensions_to_sort );
|
@@ -469,10 +467,10 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
469 |
static function tab_position() {
|
470 |
|
471 |
$tab_position = array(
|
472 |
-
'top' => __( 'Top',
|
473 |
-
'left' => __( 'Left'
|
474 |
-
'bottom' => __( 'Bottom',
|
475 |
-
'right' => __( 'Right'
|
476 |
);
|
477 |
|
478 |
$result = apply_filters( PT_CV_PREFIX_ . 'tab_position', $tab_position );
|
@@ -488,8 +486,8 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
488 |
static function thumbnail_position() {
|
489 |
|
490 |
$thumbnail_position = array(
|
491 |
-
'left' => __( 'Left'
|
492 |
-
'right' => __( 'Right'
|
493 |
);
|
494 |
|
495 |
$result = apply_filters( PT_CV_PREFIX_ . 'thumbnail_position', $thumbnail_position );
|
16 |
* @todo Define values for input, select...
|
17 |
*/
|
18 |
class PT_CV_Values {
|
|
|
19 |
/**
|
20 |
* Get Post Types
|
21 |
*
|
35 |
if ( in_array( $post_type->name, $excludes ) ) {
|
36 |
continue;
|
37 |
}
|
38 |
+
$result[ $post_type->name ] = $post_type->labels->singular_name;
|
39 |
}
|
40 |
|
41 |
$result = apply_filters( PT_CV_PREFIX_ . 'post_types_list', $result );
|
78 |
$taxonomies = get_taxonomies( $args, 'objects' );
|
79 |
|
80 |
foreach ( $taxonomies as $taxonomy ) {
|
81 |
+
$result[ $taxonomy->name ] = $taxonomy->labels->singular_name;
|
82 |
}
|
83 |
|
84 |
return $result;
|
91 |
*/
|
92 |
static function taxonomy_relation() {
|
93 |
return array(
|
94 |
+
'AND' => __( 'AND', 'content-views-query-and-display-post-page' ) . ' — ' . __( 'show posts which match all settings', 'content-views-query-and-display-post-page' ),
|
95 |
+
'OR' => __( 'OR', 'content-views-query-and-display-post-page' ) . ' — ' . __( 'show posts which match one or more settings', 'content-views-query-and-display-post-page' ),
|
96 |
);
|
97 |
}
|
98 |
|
102 |
*/
|
103 |
static function taxonomy_operators() {
|
104 |
return array(
|
105 |
+
'IN' => __( 'IN', 'content-views-query-and-display-post-page' ) . ' — ' . __( 'show posts which associate with one or more of selected terms', 'content-views-query-and-display-post-page' ),
|
106 |
+
'NOT IN' => __( 'NOT IN', 'content-views-query-and-display-post-page' ) . ' — ' . __( 'show posts which do not associate with any of selected terms', 'content-views-query-and-display-post-page' ),
|
107 |
+
'AND' => __( 'AND', 'content-views-query-and-display-post-page' ) . ' — ' . __( 'show posts which associate with all of selected terms', 'content-views-query-and-display-post-page' ),
|
108 |
);
|
109 |
}
|
110 |
|
142 |
$result = $data->$info;
|
143 |
} else {
|
144 |
if ( isset( $data->labels->$info ) ) {
|
145 |
+
$result = $data->labels->$info;
|
146 |
}
|
147 |
}
|
148 |
|
178 |
*/
|
179 |
static function yes_no( $key = '', $value = '' ) {
|
180 |
$result = array(
|
181 |
+
'yes' => __( 'Yes', 'content-views-query-and-display-post-page' ),
|
182 |
+
'no' => __( 'No', 'content-views-query-and-display-post-page' ),
|
183 |
);
|
184 |
if ( !empty( $key ) ) {
|
185 |
return array( $key => empty( $value ) ? $result[ $key ] : $value );
|
195 |
*/
|
196 |
static function show_hide() {
|
197 |
return array(
|
198 |
+
'show' => __( 'Show', 'content-views-query-and-display-post-page' ),
|
199 |
+
'hide' => __( 'Hide', 'content-views-query-and-display-post-page' ),
|
200 |
);
|
201 |
}
|
202 |
|
207 |
*/
|
208 |
static function pagination_types() {
|
209 |
$result = array(
|
210 |
+
'ajax' => __( 'Ajax', 'content-views-query-and-display-post-page' ),
|
211 |
+
'normal' => __( 'Normal', 'content-views-query-and-display-post-page' ),
|
212 |
);
|
213 |
|
214 |
$result = apply_filters( PT_CV_PREFIX_ . 'pagination_types', $result );
|
223 |
*/
|
224 |
static function pagination_styles() {
|
225 |
$result = array(
|
226 |
+
'regular' => __( 'Numbered pagination', 'content-views-query-and-display-post-page' ),
|
227 |
);
|
228 |
|
229 |
$result = apply_filters( PT_CV_PREFIX_ . 'pagination_styles', $result );
|
238 |
*/
|
239 |
static function orders() {
|
240 |
return array(
|
241 |
+
'asc' => __( 'Ascending' ),
|
242 |
+
'desc' => __( 'Descending' ),
|
243 |
);
|
244 |
}
|
245 |
|
248 |
*/
|
249 |
static function post_statuses() {
|
250 |
return array(
|
251 |
+
'publish' => __( 'Published' ),
|
252 |
+
'pending' => __( 'Pending Review' ),
|
253 |
+
'draft' => __( 'Draft' ),
|
254 |
+
'future' => __( 'Scheduled' ),
|
255 |
+
'private' => __( 'Privately Published' ),
|
256 |
+
'trash' => __( 'Trash' ),
|
257 |
+
'inherit' => __( 'Inherit', 'content-views-query-and-display-post-page' ),
|
|
|
258 |
);
|
259 |
}
|
260 |
|
266 |
static function advanced_settings() {
|
267 |
return apply_filters(
|
268 |
PT_CV_PREFIX_ . 'advanced_settings', array(
|
269 |
+
'taxonomy' => __( 'Taxonomy', 'content-views-query-and-display-post-page' ) . sprintf( ' (%s, %s...)', __( 'Categories' ), __( 'Tags' ) ),
|
270 |
+
'status' => __( 'Status' ),
|
271 |
+
'order' => __( 'Sort by', 'content-views-query-and-display-post-page' ),
|
272 |
+
'search' => __( 'Keyword' ),
|
273 |
+
'author' => __( 'Author' ),
|
274 |
)
|
275 |
);
|
276 |
}
|
284 |
$field_name = PT_CV_PREFIX . $name;
|
285 |
$selected = isset( $data[ $field_name ] ) ? $data[ $field_name ] : '';
|
286 |
|
287 |
+
return wp_dropdown_users( array( 'name' => $field_name, 'selected' => $selected, 'class' => 'form-control', 'show_option_none' => sprintf( '- %s -', __( 'Select' ) ), 'echo' => false ) );
|
288 |
}
|
289 |
|
290 |
/**
|
319 |
*/
|
320 |
static function post_regular_orderby() {
|
321 |
$regular_orderby = array(
|
322 |
+
'' => sprintf( '- %s -', __( 'Select' ) ),
|
323 |
+
'ID' => __( 'ID', 'content-views-query-and-display-post-page' ),
|
324 |
+
'title' => __( 'Title' ),
|
325 |
+
'date' => __( 'Created date', 'content-views-query-and-display-post-page' ),
|
326 |
+
'modified' => __( 'Modified date', 'content-views-query-and-display-post-page' ),
|
327 |
);
|
328 |
|
329 |
$result = apply_filters( PT_CV_PREFIX_ . 'regular_orderby', $regular_orderby );
|
339 |
static function view_type() {
|
340 |
|
341 |
$view_type = array(
|
342 |
+
'grid' => __( 'Grid', 'content-views-query-and-display-post-page' ),
|
343 |
+
'collapsible' => __( 'Collapsible List', 'content-views-query-and-display-post-page' ),
|
344 |
+
'scrollable' => __( 'Scrollable List', 'content-views-query-and-display-post-page' ),
|
345 |
);
|
346 |
|
347 |
$result = apply_filters( PT_CV_PREFIX_ . 'view_type', $view_type );
|
380 |
static function layout_format() {
|
381 |
|
382 |
$result = array(
|
383 |
+
'1-col' => __( '1 column (show all fields in one column)', 'content-views-query-and-display-post-page' ),
|
384 |
+
'2-col' => __( '2 columns (show thumbnail on the left/right side of other fields)', 'content-views-query-and-display-post-page' ),
|
385 |
);
|
386 |
|
387 |
$result = apply_filters( PT_CV_PREFIX_ . 'layout_format', $result );
|
395 |
static function open_in() {
|
396 |
|
397 |
$open_in = array(
|
398 |
+
'_self' => __( 'Current tab', 'content-views-query-and-display-post-page' ),
|
399 |
+
'_blank' => __( 'New tab', 'content-views-query-and-display-post-page' ),
|
400 |
);
|
401 |
|
402 |
$result = apply_filters( PT_CV_PREFIX_ . 'open_in', $open_in );
|
444 |
}
|
445 |
}
|
446 |
// Add full sizes
|
447 |
+
$result[ 'full' ] = __( 'Full Size' );
|
448 |
|
449 |
// Sort custom sizes by index (width * height)
|
450 |
krsort( $dimensions_to_sort );
|
467 |
static function tab_position() {
|
468 |
|
469 |
$tab_position = array(
|
470 |
+
'top' => __( 'Top', 'content-views-query-and-display-post-page' ),
|
471 |
+
'left' => __( 'Left' ),
|
472 |
+
'bottom' => __( 'Bottom', 'content-views-query-and-display-post-page' ),
|
473 |
+
'right' => __( 'Right' ),
|
474 |
);
|
475 |
|
476 |
$result = apply_filters( PT_CV_PREFIX_ . 'tab_position', $tab_position );
|
486 |
static function thumbnail_position() {
|
487 |
|
488 |
$thumbnail_position = array(
|
489 |
+
'left' => __( 'Left' ),
|
490 |
+
'right' => __( 'Right' ),
|
491 |
);
|
492 |
|
493 |
$result = apply_filters( PT_CV_PREFIX_ . 'thumbnail_position', $thumbnail_position );
|
languages/content-views-query-and-display-post-page.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Content Views\n"
|
4 |
-
"POT-Creation-Date: 2016-
|
5 |
-
"PO-Revision-Date: 2016-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: PT Guy <support@contentviewspro.com>\n"
|
8 |
"MIME-Version: 1.0\n"
|
@@ -14,81 +14,68 @@ msgstr ""
|
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
"X-Poedit-SearchPath-0: code\n"
|
16 |
|
17 |
-
#: code/admin/content-views-admin.php:
|
18 |
msgid "There is no taxonomy for selected content type"
|
19 |
msgstr ""
|
20 |
|
21 |
-
#: code/admin/content-views-admin.php:
|
22 |
msgid "Pagination is disabled when Limit = -1"
|
23 |
msgstr ""
|
24 |
|
25 |
-
#: code/admin/content-views-admin.php:
|
26 |
msgid "Opening a link is prevented in preview box"
|
27 |
msgstr ""
|
28 |
|
29 |
-
#: code/admin/content-views-admin.php:
|
|
|
30 |
msgid "Show Preview"
|
31 |
msgstr ""
|
32 |
|
33 |
-
#: code/admin/content-views-admin.php:
|
34 |
msgid "Hide Preview"
|
35 |
msgstr ""
|
36 |
|
37 |
-
#: code/admin/content-views-admin.php:
|
38 |
msgid "Update Preview"
|
39 |
msgstr ""
|
40 |
|
41 |
-
#: code/admin/content-views-admin.php:
|
42 |
-
#: code/admin/content-views-admin.php:
|
43 |
msgid "Content Views Settings"
|
44 |
msgstr ""
|
45 |
|
46 |
-
#: code/admin/content-views-admin.php:
|
47 |
msgid "Content Views"
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: code/admin/content-views-admin.php:
|
51 |
-
msgid "All Content Views"
|
52 |
-
msgstr ""
|
53 |
-
|
54 |
-
#: code/admin/content-views-admin.php:281 code/public/content-views.php:292
|
55 |
msgid "All Views"
|
56 |
msgstr ""
|
57 |
|
58 |
-
#: code/admin/content-views-admin.php:
|
59 |
msgid "Add New View"
|
60 |
msgstr ""
|
61 |
|
62 |
-
#: code/admin/content-views-admin.php:
|
63 |
-
|
64 |
-
msgstr ""
|
65 |
-
|
66 |
-
#: code/admin/content-views-admin.php:289
|
67 |
-
#: code/admin/content-views-admin.php:342 code/admin/includes/options.php:359
|
68 |
msgid "Settings"
|
69 |
msgstr ""
|
70 |
|
71 |
-
#: code/admin/content-views-admin.php:
|
72 |
-
|
73 |
-
msgstr ""
|
74 |
-
|
75 |
-
#: code/admin/content-views-admin.php:377
|
76 |
-
msgid "Edit this item"
|
77 |
-
msgstr ""
|
78 |
-
|
79 |
-
#: code/admin/content-views-admin.php:377
|
80 |
msgid "Edit"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: code/admin/content-views-admin.php:
|
84 |
msgid "Shortcode"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: code/admin/content-views-admin.php:
|
|
|
88 |
msgid "Author"
|
89 |
msgstr ""
|
90 |
|
91 |
-
#: code/admin/content-views-admin.php:
|
92 |
msgid "Date"
|
93 |
msgstr ""
|
94 |
|
@@ -101,21 +88,19 @@ msgid "Preview"
|
|
101 |
msgstr ""
|
102 |
|
103 |
#: code/admin/views/view.php:64
|
104 |
-
|
105 |
-
"To
|
106 |
-
"Preview</code> button. Otherwise, please click <code>Hide Preview</code> "
|
107 |
-
"button"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: code/admin/views/view.php:99
|
111 |
-
msgid "
|
112 |
msgstr ""
|
113 |
|
114 |
#: code/admin/views/view.php:106
|
115 |
msgid "Enter a name to identify your views easily"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: code/admin/views/view.php:117 code/admin/views/view.php:
|
119 |
msgid "Save"
|
120 |
msgstr ""
|
121 |
|
@@ -164,7 +149,7 @@ msgstr ""
|
|
164 |
msgid "Enter ID of parent page to show its children"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: code/admin/views/view.php:222
|
168 |
msgid "Limit"
|
169 |
msgstr ""
|
170 |
|
@@ -180,20 +165,23 @@ msgstr ""
|
|
180 |
msgid "Advanced filters"
|
181 |
msgstr ""
|
182 |
|
183 |
-
#: code/admin/views/view.php:
|
184 |
-
|
|
|
|
|
185 |
msgstr ""
|
186 |
|
187 |
-
#: code/admin/views/view.php:
|
188 |
-
|
|
|
189 |
msgstr ""
|
190 |
|
191 |
-
#: code/admin/views/view.php:
|
192 |
-
msgid "
|
193 |
msgstr ""
|
194 |
|
195 |
-
#: code/admin/views/view.php:
|
196 |
-
msgid "
|
197 |
msgstr ""
|
198 |
|
199 |
#: code/admin/views/view.php:342
|
@@ -207,99 +195,101 @@ msgid ""
|
|
207 |
"page (for example: %s) with layout of this View"
|
208 |
msgstr ""
|
209 |
|
210 |
-
#: code/admin/views/view.php:
|
211 |
-
|
|
|
212 |
msgstr ""
|
213 |
|
214 |
-
#: code/admin/views/view.php:
|
215 |
-
msgid "
|
216 |
msgstr ""
|
217 |
|
218 |
-
#: code/admin/views/view.php:
|
219 |
-
msgid "Not
|
220 |
msgstr ""
|
221 |
|
222 |
-
#: code/admin/views/view.php:417 code/includes/values.php:
|
223 |
msgid "Status"
|
224 |
msgstr ""
|
225 |
|
226 |
#: code/admin/views/view.php:435
|
227 |
-
msgid "
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: code/admin/views/view.php:442
|
231 |
-
msgid "
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: code/admin/views/view.php:
|
235 |
-
msgid "
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: code/admin/views/view.php:
|
239 |
-
msgid "View type
|
240 |
msgstr ""
|
241 |
|
242 |
-
#: code/admin/views/view.php:
|
243 |
msgid "Layout format"
|
244 |
msgstr ""
|
245 |
|
246 |
-
#: code/admin/views/view.php:
|
247 |
msgid "Disable this format on mobile devices & extra small screens"
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: code/admin/views/view.php:
|
251 |
msgid "Fields settings"
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: code/admin/views/view.php:
|
255 |
-
msgid "Pagination
|
256 |
msgstr ""
|
257 |
|
258 |
-
#: code/admin/views/view.php:
|
259 |
-
msgid "
|
260 |
msgstr ""
|
261 |
|
262 |
-
#: code/includes/functions.php:
|
263 |
msgid "View all posts in"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: code/includes/functions.php:
|
267 |
msgid "(no title)"
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: code/includes/functions.php:
|
271 |
-
msgid "
|
272 |
-
msgstr ""
|
273 |
-
|
274 |
-
#: code/includes/functions.php:593
|
275 |
-
msgid "Empty settings"
|
276 |
msgstr ""
|
277 |
|
278 |
-
#: code/includes/functions.php:
|
279 |
-
|
|
|
280 |
msgstr ""
|
281 |
|
282 |
#: code/includes/hooks.php:58
|
283 |
-
msgid "Please select an option in
|
284 |
msgstr ""
|
285 |
|
286 |
#: code/includes/hooks.php:59
|
287 |
-
msgid "Please set value in
|
288 |
msgstr ""
|
289 |
|
290 |
#: code/includes/hooks.php:80
|
291 |
msgid "View type"
|
292 |
msgstr ""
|
293 |
|
|
|
|
|
|
|
|
|
294 |
#: code/includes/hooks.php:90
|
295 |
msgid "Fields display"
|
296 |
msgstr ""
|
297 |
|
298 |
-
#: code/includes/hooks.php:96 code/includes/settings.php:
|
299 |
msgid "Items per page"
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: code/includes/hooks.php:107 code/includes/settings.php:
|
303 |
msgid "Items per row"
|
304 |
msgstr ""
|
305 |
|
@@ -308,54 +298,46 @@ msgid "Click to toggle"
|
|
308 |
msgstr ""
|
309 |
|
310 |
#: code/includes/html.php:118
|
311 |
-
msgid "
|
312 |
-
msgstr ""
|
313 |
-
|
314 |
-
#: code/includes/html.php:482
|
315 |
-
msgid "Read More"
|
316 |
msgstr ""
|
317 |
|
318 |
-
#: code/includes/html.php:
|
319 |
-
msgid "
|
320 |
-
msgstr ""
|
321 |
-
|
322 |
-
#: code/includes/html.php:677
|
323 |
-
msgid "0 Comment"
|
324 |
msgstr ""
|
325 |
|
326 |
-
#: code/includes/html.php:
|
327 |
-
msgid "
|
328 |
msgstr ""
|
329 |
|
330 |
-
#: code/includes/html.php:
|
331 |
-
msgid "
|
332 |
msgstr ""
|
333 |
|
334 |
-
#: code/includes/html.php:
|
335 |
msgid "by"
|
336 |
msgstr ""
|
337 |
|
338 |
-
#: code/includes/html.php:
|
339 |
msgid "Go to first page"
|
340 |
msgstr ""
|
341 |
|
342 |
-
#: code/includes/html.php:
|
343 |
msgid "Go to previous page"
|
344 |
msgstr ""
|
345 |
|
346 |
-
#: code/includes/html.php:
|
347 |
msgid "Go to next page"
|
348 |
msgstr ""
|
349 |
|
350 |
-
#: code/includes/html.php:
|
351 |
msgid "Go to last page"
|
352 |
msgstr ""
|
353 |
|
354 |
-
#: code/includes/html.php:
|
355 |
msgid "Current page is"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: code/includes/html.php:
|
359 |
msgid "Go to page"
|
360 |
msgstr ""
|
361 |
|
@@ -367,328 +349,323 @@ msgstr ""
|
|
367 |
msgid "Operator"
|
368 |
msgstr ""
|
369 |
|
370 |
-
#: code/includes/settings.php:102
|
371 |
msgid "Order"
|
372 |
msgstr ""
|
373 |
|
374 |
-
#: code/includes/settings.php:
|
375 |
-
msgid "Pagination"
|
376 |
-
msgstr ""
|
377 |
-
|
378 |
-
#: code/includes/settings.php:139
|
379 |
msgid "Enable"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: code/includes/settings.php:
|
|
|
383 |
msgid ""
|
384 |
-
"If value of
|
385 |
-
"should be smaller than <code>Limit</code> value"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: code/includes/settings.php:
|
389 |
msgid "Type"
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: code/includes/settings.php:
|
393 |
msgid "Style"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: code/includes/settings.php:
|
397 |
msgid "Open item in"
|
398 |
msgstr ""
|
399 |
|
400 |
-
#: code/includes/settings.php:
|
401 |
msgid "How to open item when click on Title, Thumbnail, Read-more button"
|
402 |
msgstr ""
|
403 |
|
404 |
-
#: code/includes/settings.php:
|
405 |
msgid "Change display order (for example: show Title above Thumbnail)"
|
406 |
msgstr ""
|
407 |
|
408 |
-
#: code/includes/settings.php:
|
409 |
-
msgid "Thumbnail
|
410 |
msgstr ""
|
411 |
|
412 |
-
#: code/includes/settings.php:
|
413 |
-
msgid "Content
|
414 |
msgstr ""
|
415 |
|
416 |
-
#: code/includes/settings.php:
|
417 |
msgid "Show Full Content"
|
418 |
msgstr ""
|
419 |
|
420 |
-
#: code/includes/settings.php:
|
421 |
msgid "Show Excerpt"
|
422 |
msgstr ""
|
423 |
|
424 |
-
#: code/includes/settings.php:
|
425 |
msgid "Excerpt settings"
|
426 |
msgstr ""
|
427 |
|
428 |
-
#: code/includes/settings.php:
|
429 |
msgid "Generate excerpt by selecting the first X words of post content"
|
430 |
msgstr ""
|
431 |
|
432 |
-
#: code/includes/settings.php:
|
433 |
-
msgid "Use manual excerpt, change
|
434 |
msgstr ""
|
435 |
|
436 |
-
#: code/includes/settings.php:
|
437 |
msgid "Allow HTML tags (a, br, strong, em, strike, i, ul, ol, li) in excerpt"
|
438 |
msgstr ""
|
439 |
|
440 |
-
#: code/includes/settings.php:
|
441 |
-
msgid "Meta fields
|
442 |
msgstr ""
|
443 |
|
444 |
-
#: code/includes/settings.php:
|
445 |
msgid "Thumbnail position"
|
446 |
msgstr ""
|
447 |
|
448 |
-
#: code/includes/settings.php:
|
449 |
msgid "Show Thumbnail"
|
450 |
msgstr ""
|
451 |
|
452 |
-
#: code/includes/settings.php:
|
453 |
msgid "Show Title"
|
454 |
msgstr ""
|
455 |
|
456 |
-
#: code/includes/settings.php:
|
457 |
msgid "Show Content"
|
458 |
msgstr ""
|
459 |
|
460 |
-
#: code/includes/settings.php:
|
461 |
-
msgid "Show Meta Fields
|
462 |
msgstr ""
|
463 |
|
464 |
#: code/includes/settings.php:566
|
|
|
|
|
|
|
|
|
465 |
msgid "Size"
|
466 |
msgstr ""
|
467 |
|
468 |
-
#: code/includes/settings.php:
|
469 |
msgid "Disable responsive image of WordPress 4.4"
|
470 |
msgstr ""
|
471 |
|
472 |
-
#: code/includes/settings.php:
|
473 |
msgid "Check this option if thumbnail looks blurry"
|
474 |
msgstr ""
|
475 |
|
476 |
-
#: code/includes/settings.php:
|
477 |
#, php-format
|
478 |
-
msgid ""
|
479 |
-
|
480 |
-
|
|
|
|
|
481 |
msgstr ""
|
482 |
|
483 |
-
#: code/includes/settings.php:
|
484 |
msgid "Show Date"
|
485 |
msgstr ""
|
486 |
|
487 |
-
#: code/includes/settings.php:
|
488 |
msgid "Show Author"
|
489 |
msgstr ""
|
490 |
|
491 |
-
#: code/includes/settings.php:
|
492 |
-
|
|
|
|
|
|
|
|
|
|
|
493 |
msgstr ""
|
494 |
|
495 |
-
#: code/includes/settings.php:
|
|
|
|
|
|
|
|
|
496 |
msgid "Show Comment Count"
|
497 |
msgstr ""
|
498 |
|
499 |
-
#: code/includes/settings.php:
|
500 |
-
msgid "
|
501 |
msgstr ""
|
502 |
|
503 |
-
#: code/includes/settings.php:
|
504 |
msgid "There is no option"
|
505 |
msgstr ""
|
506 |
|
507 |
-
#: code/includes/settings.php:
|
508 |
msgid "Get CVPro"
|
509 |
msgstr ""
|
510 |
|
511 |
-
#: code/includes/settings.php:
|
512 |
msgid "Notice"
|
513 |
msgstr ""
|
514 |
|
515 |
-
#: code/includes/values.php:
|
516 |
msgid "AND"
|
517 |
msgstr ""
|
518 |
|
519 |
-
#: code/includes/values.php:
|
520 |
msgid "show posts which match all settings"
|
521 |
msgstr ""
|
522 |
|
523 |
-
#: code/includes/values.php:
|
524 |
msgid "OR"
|
525 |
msgstr ""
|
526 |
|
527 |
-
#: code/includes/values.php:
|
528 |
msgid "show posts which match one or more settings"
|
529 |
msgstr ""
|
530 |
|
531 |
-
#: code/includes/values.php:
|
532 |
msgid "IN"
|
533 |
msgstr ""
|
534 |
|
535 |
-
#: code/includes/values.php:
|
536 |
msgid "show posts which associate with one or more of selected terms"
|
537 |
msgstr ""
|
538 |
|
539 |
-
#: code/includes/values.php:
|
540 |
msgid "NOT IN"
|
541 |
msgstr ""
|
542 |
|
543 |
-
#: code/includes/values.php:
|
544 |
msgid "show posts which do not associate with any of selected terms"
|
545 |
msgstr ""
|
546 |
|
547 |
-
#: code/includes/values.php:
|
548 |
msgid "show posts which associate with all of selected terms"
|
549 |
msgstr ""
|
550 |
|
551 |
-
#: code/includes/values.php:
|
552 |
msgid "Yes"
|
553 |
msgstr ""
|
554 |
|
555 |
-
#: code/includes/values.php:
|
556 |
msgid "No"
|
557 |
msgstr ""
|
558 |
|
559 |
-
#: code/includes/values.php:
|
560 |
msgid "Show"
|
561 |
msgstr ""
|
562 |
|
563 |
-
#: code/includes/values.php:
|
564 |
msgid "Hide"
|
565 |
msgstr ""
|
566 |
|
567 |
-
#: code/includes/values.php:
|
568 |
msgid "Ajax"
|
569 |
msgstr ""
|
570 |
|
571 |
-
#: code/includes/values.php:
|
572 |
msgid "Normal"
|
573 |
msgstr ""
|
574 |
|
575 |
-
#: code/includes/values.php:
|
576 |
msgid "Numbered pagination"
|
577 |
msgstr ""
|
578 |
|
579 |
-
#: code/includes/values.php:
|
580 |
msgid "Ascending"
|
581 |
msgstr ""
|
582 |
|
583 |
-
#: code/includes/values.php:
|
584 |
msgid "Descending"
|
585 |
msgstr ""
|
586 |
|
|
|
|
|
|
|
|
|
587 |
#: code/includes/values.php:252
|
588 |
-
msgid "
|
589 |
msgstr ""
|
590 |
|
591 |
#: code/includes/values.php:253
|
592 |
-
msgid "
|
593 |
msgstr ""
|
594 |
|
595 |
#: code/includes/values.php:254
|
596 |
-
msgid "
|
597 |
msgstr ""
|
598 |
|
599 |
#: code/includes/values.php:255
|
600 |
-
msgid "
|
601 |
msgstr ""
|
602 |
|
603 |
#: code/includes/values.php:256
|
604 |
-
msgid "
|
605 |
msgstr ""
|
606 |
|
607 |
#: code/includes/values.php:257
|
608 |
-
msgid "Private"
|
609 |
-
msgstr ""
|
610 |
-
|
611 |
-
#: code/includes/values.php:258
|
612 |
msgid "Inherit"
|
613 |
msgstr ""
|
614 |
|
615 |
-
#: code/includes/values.php:
|
616 |
-
msgid "
|
617 |
-
msgstr ""
|
618 |
-
|
619 |
-
#: code/includes/values.php:271
|
620 |
-
msgid "Taxonomy (Categories, Tags...)"
|
621 |
-
msgstr ""
|
622 |
-
|
623 |
-
#: code/includes/values.php:274
|
624 |
-
msgid "Search"
|
625 |
-
msgstr ""
|
626 |
-
|
627 |
-
#: code/includes/values.php:289 code/includes/values.php:324
|
628 |
-
msgid "- Select -"
|
629 |
msgstr ""
|
630 |
|
631 |
-
#: code/includes/values.php:
|
632 |
msgid "ID"
|
633 |
msgstr ""
|
634 |
|
635 |
-
#: code/includes/values.php:
|
636 |
-
msgid "Title"
|
637 |
-
msgstr ""
|
638 |
-
|
639 |
-
#: code/includes/values.php:327
|
640 |
msgid "Created date"
|
641 |
msgstr ""
|
642 |
|
643 |
-
#: code/includes/values.php:
|
644 |
msgid "Modified date"
|
645 |
msgstr ""
|
646 |
|
647 |
-
#: code/includes/values.php:
|
648 |
msgid "Grid"
|
649 |
msgstr ""
|
650 |
|
651 |
-
#: code/includes/values.php:
|
652 |
msgid "Collapsible List"
|
653 |
msgstr ""
|
654 |
|
655 |
-
#: code/includes/values.php:
|
656 |
msgid "Scrollable List"
|
657 |
msgstr ""
|
658 |
|
659 |
-
#: code/includes/values.php:
|
660 |
-
msgid "1 column
|
661 |
msgstr ""
|
662 |
|
663 |
-
#: code/includes/values.php:
|
664 |
-
msgid "2 columns
|
665 |
msgstr ""
|
666 |
|
667 |
-
#: code/includes/values.php:
|
668 |
msgid "Current tab"
|
669 |
msgstr ""
|
670 |
|
671 |
-
#: code/includes/values.php:
|
672 |
msgid "New tab"
|
673 |
msgstr ""
|
674 |
|
675 |
-
#: code/includes/values.php:
|
676 |
-
msgid "Full
|
677 |
msgstr ""
|
678 |
|
679 |
-
#: code/includes/values.php:
|
680 |
msgid "Top"
|
681 |
msgstr ""
|
682 |
|
683 |
-
#: code/includes/values.php:
|
684 |
msgid "Left"
|
685 |
msgstr ""
|
686 |
|
687 |
-
#: code/includes/values.php:
|
688 |
msgid "Bottom"
|
689 |
msgstr ""
|
690 |
|
691 |
-
#: code/includes/values.php:
|
692 |
msgid "Right"
|
693 |
msgstr ""
|
694 |
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Content Views\n"
|
4 |
+
"POT-Creation-Date: 2016-05-08 16:45+0700\n"
|
5 |
+
"PO-Revision-Date: 2016-05-08 17:18+0700\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: PT Guy <support@contentviewspro.com>\n"
|
8 |
"MIME-Version: 1.0\n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
"X-Poedit-SearchPath-0: code\n"
|
16 |
|
17 |
+
#: code/admin/content-views-admin.php:221
|
18 |
msgid "There is no taxonomy for selected content type"
|
19 |
msgstr ""
|
20 |
|
21 |
+
#: code/admin/content-views-admin.php:222
|
22 |
msgid "Pagination is disabled when Limit = -1"
|
23 |
msgstr ""
|
24 |
|
25 |
+
#: code/admin/content-views-admin.php:223
|
26 |
msgid "Opening a link is prevented in preview box"
|
27 |
msgstr ""
|
28 |
|
29 |
+
#: code/admin/content-views-admin.php:227 code/admin/views/view.php:64
|
30 |
+
#: code/admin/views/view.php:74
|
31 |
msgid "Show Preview"
|
32 |
msgstr ""
|
33 |
|
34 |
+
#: code/admin/content-views-admin.php:228
|
35 |
msgid "Hide Preview"
|
36 |
msgstr ""
|
37 |
|
38 |
+
#: code/admin/content-views-admin.php:229
|
39 |
msgid "Update Preview"
|
40 |
msgstr ""
|
41 |
|
42 |
+
#: code/admin/content-views-admin.php:296
|
43 |
+
#: code/admin/content-views-admin.php:308
|
44 |
msgid "Content Views Settings"
|
45 |
msgstr ""
|
46 |
|
47 |
+
#: code/admin/content-views-admin.php:296
|
48 |
msgid "Content Views"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: code/admin/content-views-admin.php:300 code/public/content-views.php:292
|
|
|
|
|
|
|
|
|
52 |
msgid "All Views"
|
53 |
msgstr ""
|
54 |
|
55 |
+
#: code/admin/content-views-admin.php:304 code/public/content-views.php:288
|
56 |
msgid "Add New View"
|
57 |
msgstr ""
|
58 |
|
59 |
+
#: code/admin/content-views-admin.php:308
|
60 |
+
#: code/admin/content-views-admin.php:361
|
|
|
|
|
|
|
|
|
61 |
msgid "Settings"
|
62 |
msgstr ""
|
63 |
|
64 |
+
#: code/admin/content-views-admin.php:396
|
65 |
+
#: code/admin/content-views-admin.php:458
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
msgid "Edit"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: code/admin/content-views-admin.php:414
|
70 |
msgid "Shortcode"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: code/admin/content-views-admin.php:415 code/admin/views/view.php:382
|
74 |
+
#: code/includes/settings.php:566 code/includes/values.php:273
|
75 |
msgid "Author"
|
76 |
msgstr ""
|
77 |
|
78 |
+
#: code/admin/content-views-admin.php:416 code/includes/settings.php:566
|
79 |
msgid "Date"
|
80 |
msgstr ""
|
81 |
|
88 |
msgstr ""
|
89 |
|
90 |
#: code/admin/views/view.php:64
|
91 |
+
#, php-format
|
92 |
+
msgid "To see live output, please click %s button"
|
|
|
|
|
93 |
msgstr ""
|
94 |
|
95 |
+
#: code/admin/views/view.php:99 code/includes/values.php:324
|
96 |
+
msgid "Title"
|
97 |
msgstr ""
|
98 |
|
99 |
#: code/admin/views/view.php:106
|
100 |
msgid "Enter a name to identify your views easily"
|
101 |
msgstr ""
|
102 |
|
103 |
+
#: code/admin/views/view.php:117 code/admin/views/view.php:632
|
104 |
msgid "Save"
|
105 |
msgstr ""
|
106 |
|
149 |
msgid "Enter ID of parent page to show its children"
|
150 |
msgstr ""
|
151 |
|
152 |
+
#: code/admin/views/view.php:222 code/includes/settings.php:165
|
153 |
msgid "Limit"
|
154 |
msgstr ""
|
155 |
|
165 |
msgid "Advanced filters"
|
166 |
msgstr ""
|
167 |
|
168 |
+
#: code/admin/views/view.php:295 code/admin/views/view.php:382
|
169 |
+
#: code/admin/views/view.php:417 code/admin/views/view.php:442
|
170 |
+
#, php-format
|
171 |
+
msgid "Filter by %s"
|
172 |
msgstr ""
|
173 |
|
174 |
+
#: code/admin/views/view.php:295 code/includes/settings.php:566
|
175 |
+
#: code/includes/values.php:269
|
176 |
+
msgid "Taxonomy"
|
177 |
msgstr ""
|
178 |
|
179 |
+
#: code/admin/views/view.php:299
|
180 |
+
msgid "Select taxonomy"
|
181 |
msgstr ""
|
182 |
|
183 |
+
#: code/admin/views/view.php:317
|
184 |
+
msgid "Filter by custom taxonomies"
|
185 |
msgstr ""
|
186 |
|
187 |
#: code/admin/views/view.php:342
|
195 |
"page (for example: %s) with layout of this View"
|
196 |
msgstr ""
|
197 |
|
198 |
+
#: code/admin/views/view.php:359 code/admin/views/view.php:362
|
199 |
+
#: code/includes/settings.php:88 code/includes/values.php:271
|
200 |
+
msgid "Sort by"
|
201 |
msgstr ""
|
202 |
|
203 |
+
#: code/admin/views/view.php:385
|
204 |
+
msgid "By author"
|
205 |
msgstr ""
|
206 |
|
207 |
+
#: code/admin/views/view.php:401
|
208 |
+
msgid "Not by author"
|
209 |
msgstr ""
|
210 |
|
211 |
+
#: code/admin/views/view.php:417 code/includes/values.php:270
|
212 |
msgid "Status"
|
213 |
msgstr ""
|
214 |
|
215 |
#: code/admin/views/view.php:435
|
216 |
+
msgid "Select post status"
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: code/admin/views/view.php:442 code/includes/values.php:272
|
220 |
+
msgid "Keyword"
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: code/admin/views/view.php:457
|
224 |
+
msgid "Enter keyword to searching for posts"
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: code/admin/views/view.php:480 code/includes/hooks.php:107
|
228 |
+
msgid "View type (Layout)"
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: code/admin/views/view.php:511 code/includes/hooks.php:85
|
232 |
msgid "Layout format"
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: code/admin/views/view.php:553
|
236 |
msgid "Disable this format on mobile devices & extra small screens"
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: code/admin/views/view.php:566
|
240 |
msgid "Fields settings"
|
241 |
msgstr ""
|
242 |
|
243 |
+
#: code/admin/views/view.php:584 code/includes/hooks.php:96
|
244 |
+
msgid "Pagination"
|
245 |
msgstr ""
|
246 |
|
247 |
+
#: code/admin/views/view.php:601
|
248 |
+
msgid "Others"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: code/includes/functions.php:456
|
252 |
msgid "View all posts in"
|
253 |
msgstr ""
|
254 |
|
255 |
+
#: code/includes/functions.php:518 code/includes/html.php:430
|
256 |
msgid "(no title)"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: code/includes/functions.php:582
|
260 |
+
msgid "Cheatin’ uh?"
|
|
|
|
|
|
|
|
|
261 |
msgstr ""
|
262 |
|
263 |
+
#: code/includes/functions.php:620
|
264 |
+
#, php-format
|
265 |
+
msgid "Empty settings (View %s is not existed)"
|
266 |
msgstr ""
|
267 |
|
268 |
#: code/includes/hooks.php:58
|
269 |
+
msgid "Please select an option in"
|
270 |
msgstr ""
|
271 |
|
272 |
#: code/includes/hooks.php:59
|
273 |
+
msgid "Please set value in"
|
274 |
msgstr ""
|
275 |
|
276 |
#: code/includes/hooks.php:80
|
277 |
msgid "View type"
|
278 |
msgstr ""
|
279 |
|
280 |
+
#: code/includes/hooks.php:90
|
281 |
+
msgid "Fields"
|
282 |
+
msgstr ""
|
283 |
+
|
284 |
#: code/includes/hooks.php:90
|
285 |
msgid "Fields display"
|
286 |
msgstr ""
|
287 |
|
288 |
+
#: code/includes/hooks.php:96 code/includes/settings.php:152
|
289 |
msgid "Items per page"
|
290 |
msgstr ""
|
291 |
|
292 |
+
#: code/includes/hooks.php:107 code/includes/settings.php:736
|
293 |
msgid "Items per row"
|
294 |
msgstr ""
|
295 |
|
298 |
msgstr ""
|
299 |
|
300 |
#: code/includes/html.php:118
|
301 |
+
msgid "Loading…"
|
|
|
|
|
|
|
|
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: code/includes/html.php:249
|
305 |
+
msgid "No posts found."
|
|
|
|
|
|
|
|
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: code/includes/html.php:480
|
309 |
+
msgid "Read more..."
|
310 |
msgstr ""
|
311 |
|
312 |
+
#: code/includes/html.php:666
|
313 |
+
msgid "in"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: code/includes/html.php:693
|
317 |
msgid "by"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: code/includes/html.php:868
|
321 |
msgid "Go to first page"
|
322 |
msgstr ""
|
323 |
|
324 |
+
#: code/includes/html.php:869
|
325 |
msgid "Go to previous page"
|
326 |
msgstr ""
|
327 |
|
328 |
+
#: code/includes/html.php:870
|
329 |
msgid "Go to next page"
|
330 |
msgstr ""
|
331 |
|
332 |
+
#: code/includes/html.php:871
|
333 |
msgid "Go to last page"
|
334 |
msgstr ""
|
335 |
|
336 |
+
#: code/includes/html.php:872
|
337 |
msgid "Current page is"
|
338 |
msgstr ""
|
339 |
|
340 |
+
#: code/includes/html.php:873
|
341 |
msgid "Go to page"
|
342 |
msgstr ""
|
343 |
|
349 |
msgid "Operator"
|
350 |
msgstr ""
|
351 |
|
352 |
+
#: code/includes/settings.php:102
|
353 |
msgid "Order"
|
354 |
msgstr ""
|
355 |
|
356 |
+
#: code/includes/settings.php:144
|
|
|
|
|
|
|
|
|
357 |
msgid "Enable"
|
358 |
msgstr ""
|
359 |
|
360 |
+
#: code/includes/settings.php:165
|
361 |
+
#, php-format
|
362 |
msgid ""
|
363 |
+
"If value of %s setting is not empty, this value should be smaller than that"
|
|
|
364 |
msgstr ""
|
365 |
|
366 |
+
#: code/includes/settings.php:173
|
367 |
msgid "Type"
|
368 |
msgstr ""
|
369 |
|
370 |
+
#: code/includes/settings.php:201
|
371 |
msgid "Style"
|
372 |
msgstr ""
|
373 |
|
374 |
+
#: code/includes/settings.php:236
|
375 |
msgid "Open item in"
|
376 |
msgstr ""
|
377 |
|
378 |
+
#: code/includes/settings.php:244
|
379 |
msgid "How to open item when click on Title, Thumbnail, Read-more button"
|
380 |
msgstr ""
|
381 |
|
382 |
+
#: code/includes/settings.php:283
|
383 |
msgid "Change display order (for example: show Title above Thumbnail)"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: code/includes/settings.php:289
|
387 |
+
msgid "Thumbnail"
|
388 |
msgstr ""
|
389 |
|
390 |
+
#: code/includes/settings.php:308
|
391 |
+
msgid "Content"
|
392 |
msgstr ""
|
393 |
|
394 |
+
#: code/includes/settings.php:320
|
395 |
msgid "Show Full Content"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: code/includes/settings.php:321
|
399 |
msgid "Show Excerpt"
|
400 |
msgstr ""
|
401 |
|
402 |
+
#: code/includes/settings.php:361
|
403 |
msgid "Excerpt settings"
|
404 |
msgstr ""
|
405 |
|
406 |
+
#: code/includes/settings.php:370
|
407 |
msgid "Generate excerpt by selecting the first X words of post content"
|
408 |
msgstr ""
|
409 |
|
410 |
+
#: code/includes/settings.php:375
|
411 |
+
msgid "Use manual excerpt, change \"Read More\" text"
|
412 |
msgstr ""
|
413 |
|
414 |
+
#: code/includes/settings.php:385
|
415 |
msgid "Allow HTML tags (a, br, strong, em, strike, i, ul, ol, li) in excerpt"
|
416 |
msgstr ""
|
417 |
|
418 |
+
#: code/includes/settings.php:404
|
419 |
+
msgid "Meta fields"
|
420 |
msgstr ""
|
421 |
|
422 |
+
#: code/includes/settings.php:476
|
423 |
msgid "Thumbnail position"
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: code/includes/settings.php:508
|
427 |
msgid "Show Thumbnail"
|
428 |
msgstr ""
|
429 |
|
430 |
+
#: code/includes/settings.php:528
|
431 |
msgid "Show Title"
|
432 |
msgstr ""
|
433 |
|
434 |
+
#: code/includes/settings.php:547
|
435 |
msgid "Show Content"
|
436 |
msgstr ""
|
437 |
|
438 |
+
#: code/includes/settings.php:566
|
439 |
+
msgid "Show Meta Fields"
|
440 |
msgstr ""
|
441 |
|
442 |
#: code/includes/settings.php:566
|
443 |
+
msgid "Comment"
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: code/includes/settings.php:591
|
447 |
msgid "Size"
|
448 |
msgstr ""
|
449 |
|
450 |
+
#: code/includes/settings.php:617
|
451 |
msgid "Disable responsive image of WordPress 4.4"
|
452 |
msgstr ""
|
453 |
|
454 |
+
#: code/includes/settings.php:619
|
455 |
msgid "Check this option if thumbnail looks blurry"
|
456 |
msgstr ""
|
457 |
|
458 |
+
#: code/includes/settings.php:624
|
459 |
#, php-format
|
460 |
+
msgid "In this lite version, thumbnail is only shown if post has %s"
|
461 |
+
msgstr ""
|
462 |
+
|
463 |
+
#: code/includes/settings.php:624
|
464 |
+
msgid "Featured Image"
|
465 |
msgstr ""
|
466 |
|
467 |
+
#: code/includes/settings.php:652
|
468 |
msgid "Show Date"
|
469 |
msgstr ""
|
470 |
|
471 |
+
#: code/includes/settings.php:671
|
472 |
msgid "Show Author"
|
473 |
msgstr ""
|
474 |
|
475 |
+
#: code/includes/settings.php:690
|
476 |
+
#, php-format
|
477 |
+
msgid "Show Taxonomies (%s, %s...)"
|
478 |
+
msgstr ""
|
479 |
+
|
480 |
+
#: code/includes/settings.php:690 code/includes/values.php:269
|
481 |
+
msgid "Categories"
|
482 |
msgstr ""
|
483 |
|
484 |
+
#: code/includes/settings.php:690 code/includes/values.php:269
|
485 |
+
msgid "Tags"
|
486 |
+
msgstr ""
|
487 |
+
|
488 |
+
#: code/includes/settings.php:710
|
489 |
msgid "Show Comment Count"
|
490 |
msgstr ""
|
491 |
|
492 |
+
#: code/includes/settings.php:776
|
493 |
+
msgid "Open first item by default"
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: code/includes/settings.php:812
|
497 |
msgid "There is no option"
|
498 |
msgstr ""
|
499 |
|
500 |
+
#: code/includes/settings.php:844
|
501 |
msgid "Get CVPro"
|
502 |
msgstr ""
|
503 |
|
504 |
+
#: code/includes/settings.php:859
|
505 |
msgid "Notice"
|
506 |
msgstr ""
|
507 |
|
508 |
+
#: code/includes/values.php:94 code/includes/values.php:107
|
509 |
msgid "AND"
|
510 |
msgstr ""
|
511 |
|
512 |
+
#: code/includes/values.php:94
|
513 |
msgid "show posts which match all settings"
|
514 |
msgstr ""
|
515 |
|
516 |
+
#: code/includes/values.php:95
|
517 |
msgid "OR"
|
518 |
msgstr ""
|
519 |
|
520 |
+
#: code/includes/values.php:95
|
521 |
msgid "show posts which match one or more settings"
|
522 |
msgstr ""
|
523 |
|
524 |
+
#: code/includes/values.php:105
|
525 |
msgid "IN"
|
526 |
msgstr ""
|
527 |
|
528 |
+
#: code/includes/values.php:105
|
529 |
msgid "show posts which associate with one or more of selected terms"
|
530 |
msgstr ""
|
531 |
|
532 |
+
#: code/includes/values.php:106
|
533 |
msgid "NOT IN"
|
534 |
msgstr ""
|
535 |
|
536 |
+
#: code/includes/values.php:106
|
537 |
msgid "show posts which do not associate with any of selected terms"
|
538 |
msgstr ""
|
539 |
|
540 |
+
#: code/includes/values.php:107
|
541 |
msgid "show posts which associate with all of selected terms"
|
542 |
msgstr ""
|
543 |
|
544 |
+
#: code/includes/values.php:181
|
545 |
msgid "Yes"
|
546 |
msgstr ""
|
547 |
|
548 |
+
#: code/includes/values.php:182
|
549 |
msgid "No"
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: code/includes/values.php:198
|
553 |
msgid "Show"
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: code/includes/values.php:199
|
557 |
msgid "Hide"
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: code/includes/values.php:210
|
561 |
msgid "Ajax"
|
562 |
msgstr ""
|
563 |
|
564 |
+
#: code/includes/values.php:211
|
565 |
msgid "Normal"
|
566 |
msgstr ""
|
567 |
|
568 |
+
#: code/includes/values.php:226
|
569 |
msgid "Numbered pagination"
|
570 |
msgstr ""
|
571 |
|
572 |
+
#: code/includes/values.php:241
|
573 |
msgid "Ascending"
|
574 |
msgstr ""
|
575 |
|
576 |
+
#: code/includes/values.php:242
|
577 |
msgid "Descending"
|
578 |
msgstr ""
|
579 |
|
580 |
+
#: code/includes/values.php:251
|
581 |
+
msgid "Published"
|
582 |
+
msgstr ""
|
583 |
+
|
584 |
#: code/includes/values.php:252
|
585 |
+
msgid "Pending Review"
|
586 |
msgstr ""
|
587 |
|
588 |
#: code/includes/values.php:253
|
589 |
+
msgid "Draft"
|
590 |
msgstr ""
|
591 |
|
592 |
#: code/includes/values.php:254
|
593 |
+
msgid "Scheduled"
|
594 |
msgstr ""
|
595 |
|
596 |
#: code/includes/values.php:255
|
597 |
+
msgid "Privately Published"
|
598 |
msgstr ""
|
599 |
|
600 |
#: code/includes/values.php:256
|
601 |
+
msgid "Trash"
|
602 |
msgstr ""
|
603 |
|
604 |
#: code/includes/values.php:257
|
|
|
|
|
|
|
|
|
605 |
msgid "Inherit"
|
606 |
msgstr ""
|
607 |
|
608 |
+
#: code/includes/values.php:287 code/includes/values.php:322
|
609 |
+
msgid "Select"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
610 |
msgstr ""
|
611 |
|
612 |
+
#: code/includes/values.php:323
|
613 |
msgid "ID"
|
614 |
msgstr ""
|
615 |
|
616 |
+
#: code/includes/values.php:325
|
|
|
|
|
|
|
|
|
617 |
msgid "Created date"
|
618 |
msgstr ""
|
619 |
|
620 |
+
#: code/includes/values.php:326
|
621 |
msgid "Modified date"
|
622 |
msgstr ""
|
623 |
|
624 |
+
#: code/includes/values.php:342
|
625 |
msgid "Grid"
|
626 |
msgstr ""
|
627 |
|
628 |
+
#: code/includes/values.php:343
|
629 |
msgid "Collapsible List"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: code/includes/values.php:344
|
633 |
msgid "Scrollable List"
|
634 |
msgstr ""
|
635 |
|
636 |
+
#: code/includes/values.php:383
|
637 |
+
msgid "1 column (show all fields in one column)"
|
638 |
msgstr ""
|
639 |
|
640 |
+
#: code/includes/values.php:384
|
641 |
+
msgid "2 columns (show thumbnail on the left/right side of other fields)"
|
642 |
msgstr ""
|
643 |
|
644 |
+
#: code/includes/values.php:398
|
645 |
msgid "Current tab"
|
646 |
msgstr ""
|
647 |
|
648 |
+
#: code/includes/values.php:399
|
649 |
msgid "New tab"
|
650 |
msgstr ""
|
651 |
|
652 |
+
#: code/includes/values.php:447
|
653 |
+
msgid "Full Size"
|
654 |
msgstr ""
|
655 |
|
656 |
+
#: code/includes/values.php:470
|
657 |
msgid "Top"
|
658 |
msgstr ""
|
659 |
|
660 |
+
#: code/includes/values.php:471 code/includes/values.php:489
|
661 |
msgid "Left"
|
662 |
msgstr ""
|
663 |
|
664 |
+
#: code/includes/values.php:472
|
665 |
msgid "Bottom"
|
666 |
msgstr ""
|
667 |
|
668 |
+
#: code/includes/values.php:473 code/includes/values.php:490
|
669 |
msgid "Right"
|
670 |
msgstr ""
|
671 |
|
public/assets/css/public.css
CHANGED
@@ -271,6 +271,8 @@
|
|
271 |
margin-bottom: 10px !important;
|
272 |
}
|
273 |
|
|
|
|
|
274 |
/* Prevent weird layout caused by theme style */
|
275 |
.pt-cv-scrollable .carousel .item {
|
276 |
height: auto;
|
271 |
margin-bottom: 10px !important;
|
272 |
}
|
273 |
|
274 |
+
.pt-cv-carousel-caption:empty {display: none;}
|
275 |
+
|
276 |
/* Prevent weird layout caused by theme style */
|
277 |
.pt-cv-scrollable .carousel .item {
|
278 |
height: auto;
|
public/content-views.php
CHANGED
@@ -263,11 +263,11 @@ class PT_Content_Views {
|
|
263 |
$cv_lang_dir = dirname( plugin_basename( PT_CV_FILE ) ) . '/languages/';
|
264 |
|
265 |
if ( file_exists( $custom_mofile ) ) {
|
266 |
-
load_textdomain(
|
267 |
} elseif ( file_exists( $language_packs_mofile ) ) {
|
268 |
-
load_textdomain(
|
269 |
} else {
|
270 |
-
load_plugin_textdomain(
|
271 |
}
|
272 |
}
|
273 |
|
@@ -280,35 +280,35 @@ class PT_Content_Views {
|
|
280 |
* Register custom post type : View
|
281 |
*/
|
282 |
$labels = array(
|
283 |
-
'name'
|
284 |
-
'singular_name'
|
285 |
-
'menu_name'
|
286 |
-
'name_admin_bar'
|
287 |
-
'add_new'
|
288 |
-
'add_new_item'
|
289 |
-
'new_item'
|
290 |
-
'edit_item'
|
291 |
-
'view_item'
|
292 |
-
'all_items'
|
293 |
-
'search_items'
|
294 |
-
'parent_item_colon'
|
295 |
-
'not_found'
|
296 |
-
'not_found_in_trash' => __( 'No views found in Trash.',
|
297 |
);
|
298 |
|
299 |
$args = array(
|
300 |
-
'labels'
|
301 |
-
'public'
|
302 |
// Hide in menu, but can see All Views page
|
303 |
-
'show_ui'
|
304 |
-
'show_in_menu'
|
305 |
-
'query_var'
|
306 |
-
'rewrite'
|
307 |
-
'capability_type'
|
308 |
-
'has_archive'
|
309 |
-
'hierarchical'
|
310 |
-
'menu_position'
|
311 |
-
'supports'
|
312 |
);
|
313 |
|
314 |
register_post_type( PT_CV_POST_TYPE, $args );
|
263 |
$cv_lang_dir = dirname( plugin_basename( PT_CV_FILE ) ) . '/languages/';
|
264 |
|
265 |
if ( file_exists( $custom_mofile ) ) {
|
266 |
+
load_textdomain( 'content-views-query-and-display-post-page', $custom_mofile );
|
267 |
} elseif ( file_exists( $language_packs_mofile ) ) {
|
268 |
+
load_textdomain( 'content-views-query-and-display-post-page', $language_packs_mofile );
|
269 |
} else {
|
270 |
+
load_plugin_textdomain( 'content-views-query-and-display-post-page', FALSE, $cv_lang_dir );
|
271 |
}
|
272 |
}
|
273 |
|
280 |
* Register custom post type : View
|
281 |
*/
|
282 |
$labels = array(
|
283 |
+
'name' => _x( 'Views', 'post type general name', 'content-views-query-and-display-post-page' ),
|
284 |
+
'singular_name' => _x( 'View', 'post type singular name', 'content-views-query-and-display-post-page' ),
|
285 |
+
'menu_name' => _x( 'Views', 'admin menu', 'content-views-query-and-display-post-page' ),
|
286 |
+
'name_admin_bar' => _x( 'View', 'add new on admin bar', 'content-views-query-and-display-post-page' ),
|
287 |
+
'add_new' => _x( 'Add New', 'post' ),
|
288 |
+
'add_new_item' => __( 'Add New View', 'content-views-query-and-display-post-page' ),
|
289 |
+
'new_item' => __( 'New View', 'content-views-query-and-display-post-page' ),
|
290 |
+
'edit_item' => __( 'Edit View', 'content-views-query-and-display-post-page' ),
|
291 |
+
'view_item' => __( 'View View', 'content-views-query-and-display-post-page' ),
|
292 |
+
'all_items' => __( 'All Views', 'content-views-query-and-display-post-page' ),
|
293 |
+
'search_items' => __( 'Search Views', 'content-views-query-and-display-post-page' ),
|
294 |
+
'parent_item_colon' => __( 'Parent Views:', 'content-views-query-and-display-post-page' ),
|
295 |
+
'not_found' => __( 'No views found.', 'content-views-query-and-display-post-page' ),
|
296 |
+
'not_found_in_trash' => __( 'No views found in Trash.', 'content-views-query-and-display-post-page' ),
|
297 |
);
|
298 |
|
299 |
$args = array(
|
300 |
+
'labels' => $labels,
|
301 |
+
'public' => false,
|
302 |
// Hide in menu, but can see All Views page
|
303 |
+
'show_ui' => true, // set "true" to fix "Invalid post type" error
|
304 |
+
'show_in_menu' => false,
|
305 |
+
'query_var' => true,
|
306 |
+
'rewrite' => array( 'slug' => PT_CV_POST_TYPE ),
|
307 |
+
'capability_type' => 'post',
|
308 |
+
'has_archive' => true,
|
309 |
+
'hierarchical' => false,
|
310 |
+
'menu_position' => null,
|
311 |
+
'supports' => array( 'title', 'author', 'custom-fields' ),
|
312 |
);
|
313 |
|
314 |
register_post_type( PT_CV_POST_TYPE, $args );
|