Version Description
- Bug fixed: Admin bar is hidden on pages which do not use View
- Bug fixed: Fix warning message in Dashboard
- Improvement: Don't auto expand width of items (follow 'Items per row' setting completely)
Download this release
Release Info
Developer | PT Guy |
Plugin | Content Views – Post Grid & List for WordPress |
Version | 1.3.8 |
Comparing to | |
See all releases |
Code changes from version 1.3.6 to 1.3.8
- README.txt +6 -1
- admin/content-views-admin.php +3 -0
- content-views.php +2 -2
- includes/html-viewtype.php +1 -1
- includes/html.php +11 -2
- public/assets/css/public.css +1 -1
- public/content-views.php +12 -0
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: post, posts, page, pages, query, queries, search, display, show, grid, layout, author, blog, categories, category, comment, content, custom, editor, filter, Formatting, image, list, meta, plugin, responsive, shortcode, excerpt, title, tag, term, Taxonomy, thumbnail, pagination, date, scrollable, slider, collapsible
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.0
|
7 |
-
Stable tag: 1.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -144,6 +144,11 @@ You can create Unlimited Views, in Unlimited websites
|
|
144 |
|
145 |
== Changelog ==
|
146 |
|
|
|
|
|
|
|
|
|
|
|
147 |
= 1.3.6 =
|
148 |
* Improvement: A very new customized Bootstrap style
|
149 |
* Bug fixed: script which hooks to wp_footer is not loaded
|
4 |
Tags: post, posts, page, pages, query, queries, search, display, show, grid, layout, author, blog, categories, category, comment, content, custom, editor, filter, Formatting, image, list, meta, plugin, responsive, shortcode, excerpt, title, tag, term, Taxonomy, thumbnail, pagination, date, scrollable, slider, collapsible
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.0
|
7 |
+
Stable tag: 1.3.8
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
144 |
|
145 |
== Changelog ==
|
146 |
|
147 |
+
= 1.3.8 =
|
148 |
+
* Bug fixed: Admin bar is hidden on pages which do not use View
|
149 |
+
* Bug fixed: Fix warning message in Dashboard
|
150 |
+
* Improvement: Don't auto expand width of items (follow 'Items per row' setting completely)
|
151 |
+
|
152 |
= 1.3.6 =
|
153 |
* Improvement: A very new customized Bootstrap style
|
154 |
* Bug fixed: script which hooks to wp_footer is not loaded
|
admin/content-views-admin.php
CHANGED
@@ -426,6 +426,9 @@ class PT_Content_Views_Admin {
|
|
426 |
*/
|
427 |
public function filter_admin_title( $admin_title, $title ) {
|
428 |
$screen = get_current_screen();
|
|
|
|
|
|
|
429 |
|
430 |
// If is View page
|
431 |
if ( $this->plugin_screen_hook_suffix == $screen->id || in_array( $screen->id, $this->plugin_sub_screen_hook_suffix ) ) {
|
426 |
*/
|
427 |
public function filter_admin_title( $admin_title, $title ) {
|
428 |
$screen = get_current_screen();
|
429 |
+
|
430 |
+
if ( ! $this || ! isset ( $this->plugin_sub_screen_hook_suffix ) )
|
431 |
+
return $admin_title;
|
432 |
|
433 |
// If is View page
|
434 |
if ( $this->plugin_screen_hook_suffix == $screen->id || in_array( $screen->id, $this->plugin_sub_screen_hook_suffix ) ) {
|
content-views.php
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
* Plugin Name: Content Views
|
11 |
* Plugin URI: http://wordpress.org/plugins/content-views-query-and-display-post-page/
|
12 |
* Description: Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
|
13 |
-
* Version: 1.3.
|
14 |
* Author: PT Guy
|
15 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
16 |
* Text Domain: content-views
|
@@ -27,7 +27,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
27 |
/*
|
28 |
* Define Constant
|
29 |
*/
|
30 |
-
define( 'PT_CV_VERSION', '1.3.
|
31 |
define( 'PT_CV_FILE', __FILE__ );
|
32 |
$pt_cv_path = plugin_dir_path( __FILE__ );
|
33 |
include_once( $pt_cv_path . 'includes/defines.php' );
|
10 |
* Plugin Name: Content Views
|
11 |
* Plugin URI: http://wordpress.org/plugins/content-views-query-and-display-post-page/
|
12 |
* Description: Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
|
13 |
+
* Version: 1.3.8
|
14 |
* Author: PT Guy
|
15 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
16 |
* Text Domain: content-views
|
27 |
/*
|
28 |
* Define Constant
|
29 |
*/
|
30 |
+
define( 'PT_CV_VERSION', '1.3.8' );
|
31 |
define( 'PT_CV_FILE', __FILE__ );
|
32 |
$pt_cv_path = plugin_dir_path( __FILE__ );
|
33 |
include_once( $pt_cv_path . 'includes/defines.php' );
|
includes/html-viewtype.php
CHANGED
@@ -28,8 +28,8 @@ if ( ! class_exists( 'PT_CV_Html_ViewType' ) ) {
|
|
28 |
global $dargs;
|
29 |
|
30 |
// -- Get column span
|
31 |
-
$columns = ( (int) $dargs['number-columns'] < count( $content_items ) ) ? (int) $dargs['number-columns'] : count( $content_items );
|
32 |
|
|
|
33 |
if ( ! $columns ) {
|
34 |
$columns = 1;
|
35 |
}
|
28 |
global $dargs;
|
29 |
|
30 |
// -- Get column span
|
|
|
31 |
|
32 |
+
$columns = (int) $dargs['number-columns'];
|
33 |
if ( ! $columns ) {
|
34 |
$columns = 1;
|
35 |
}
|
includes/html.php
CHANGED
@@ -746,8 +746,17 @@ if ( ! class_exists( 'PT_CV_Html' ) ) {
|
|
746 |
* by merging css files to public/assets/css/public.css, js files to public/assets/js/public.js
|
747 |
*/
|
748 |
static function assets_of_view_types() {
|
749 |
-
|
750 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
751 |
|
752 |
$assets = array( 'css', 'js' );
|
753 |
$assets_output = $assets_files = array();
|
746 |
* by merging css files to public/assets/css/public.css, js files to public/assets/js/public.js
|
747 |
*/
|
748 |
static function assets_of_view_types() {
|
749 |
+
global $did_assets_of_view_types, $pt_view_sid;
|
750 |
+
|
751 |
+
// If already processed | have no View on this page -> return
|
752 |
+
if ( ( $did_assets_of_view_types && isset( $did_assets_of_view_types[$pt_view_sid] ) ) || ! $pt_view_sid ) {
|
753 |
+
return;
|
754 |
+
}
|
755 |
+
// Mark as processed
|
756 |
+
if ( ! $did_assets_of_view_types ) {
|
757 |
+
$did_assets_of_view_types = array();
|
758 |
+
}
|
759 |
+
$did_assets_of_view_types[$pt_view_sid] = 1;
|
760 |
|
761 |
$assets = array( 'css', 'js' );
|
762 |
$assets_output = $assets_files = array();
|
public/assets/css/public.css
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
/* Common */
|
24 |
.pt-cv-view {
|
25 |
position: relative;
|
26 |
-
margin-bottom: 30px
|
27 |
clear: both;
|
28 |
}
|
29 |
|
23 |
/* Common */
|
24 |
.pt-cv-view {
|
25 |
position: relative;
|
26 |
+
/*margin-bottom: 30px;*/
|
27 |
clear: both;
|
28 |
}
|
29 |
|
public/content-views.php
CHANGED
@@ -55,6 +55,8 @@ class PT_Content_Views {
|
|
55 |
// Update view count of post
|
56 |
add_action( 'wp_head', array( &$this, 'update_view_count' ) );
|
57 |
|
|
|
|
|
58 |
// Output assets content at footer of page
|
59 |
add_action( 'wp_footer', array( 'PT_CV_Html', 'assets_of_view_types' ), 100 );
|
60 |
|
@@ -321,4 +323,14 @@ class PT_Content_Views {
|
|
321 |
}
|
322 |
}
|
323 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
}
|
55 |
// Update view count of post
|
56 |
add_action( 'wp_head', array( &$this, 'update_view_count' ) );
|
57 |
|
58 |
+
add_action( 'wp_head', array( &$this, 'init_global_variables' ) );
|
59 |
+
|
60 |
// Output assets content at footer of page
|
61 |
add_action( 'wp_footer', array( 'PT_CV_Html', 'assets_of_view_types' ), 100 );
|
62 |
|
323 |
}
|
324 |
}
|
325 |
|
326 |
+
/**
|
327 |
+
* Init global variables
|
328 |
+
*
|
329 |
+
* @global type $did_assets_of_view_types
|
330 |
+
*/
|
331 |
+
public function init_global_variables() {
|
332 |
+
global $did_assets_of_view_types;
|
333 |
+
$did_assets_of_view_types = array();
|
334 |
+
}
|
335 |
+
|
336 |
}
|