Content Views – Post Grid & List for WordPress - Version 1.3.1.6

Version Description

  • Improvement: Update page title as "Edit View" in edit View page
  • Bug fixed: Fix some warnings in PHP 5.2
Download this release

Release Info

Developer PT Guy
Plugin Icon 128x128 Content Views – Post Grid & List for WordPress
Version 1.3.1.6
Comparing to
See all releases

Code changes from version 1.3.1.5 to 1.3.1.6

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.1.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -142,6 +142,10 @@ You can create Unlimited Views, in Unlimited websites
142
 
143
  == Changelog ==
144
 
 
 
 
 
145
  = 1.3.1.5 =
146
  * Test up to 4.0
147
 
@@ -254,6 +258,9 @@ You can create Unlimited Views, in Unlimited websites
254
 
255
  == Upgrade Notice ==
256
 
 
 
 
257
  = 1.3.1.5 =
258
  Test up to 4.0
259
 
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.1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
142
 
143
  == Changelog ==
144
 
145
+ = 1.3.1.6 =
146
+ * Improvement: Update page title as "Edit View" in edit View page
147
+ * Bug fixed: Fix some warnings in PHP 5.2
148
+
149
  = 1.3.1.5 =
150
  * Test up to 4.0
151
 
258
 
259
  == Upgrade Notice ==
260
 
261
+ = 1.3.1.6 =
262
+ Improvement: Update page title as "Edit View" in edit View page. Bug fixed: Fix some warnings in PHP 5.2
263
+
264
  = 1.3.1.5 =
265
  Test up to 4.0
266
 
admin/content-views-admin.php CHANGED
@@ -69,6 +69,14 @@ class PT_Content_Views_Admin {
69
  // Add the options page and menu item.
70
  add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
71
 
 
 
 
 
 
 
 
 
72
  // Add an action link pointing to the options page.
73
  $plugin_basename = plugin_basename( plugin_dir_path( dirname(__FILE__) ) . $this->plugin_slug . '.php' );
74
  add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'filter_add_action_links' ) );
@@ -79,12 +87,8 @@ class PT_Content_Views_Admin {
79
  // Filter link of Title in All Views page
80
  add_filter( 'get_edit_post_link', array( $this, 'filter_get_edit_post_link' ), 10, 3 );
81
 
82
- // Ajax action
83
- $action = 'preview_request';
84
- add_action( 'wp_ajax_' . $action, array( 'PT_CV_Functions', 'ajax_callback_' . $action ) );
85
-
86
- // Output assets content at footer of page
87
- add_action( PT_CV_PREFIX_ . 'preview_footer', array( 'PT_CV_Html', 'assets_of_view_types' ) );
88
 
89
  // Custom hooks for both preview & frontend
90
  PT_CV_Hooks::init();
@@ -407,4 +411,24 @@ class PT_Content_Views_Admin {
407
  return $edit_link;
408
  }
409
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
  }
69
  // Add the options page and menu item.
70
  add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
71
 
72
+ // Ajax action
73
+ $action = 'preview_request';
74
+ add_action( 'wp_ajax_' . $action, array( 'PT_CV_Functions', 'ajax_callback_' . $action ) );
75
+
76
+ // Output assets content at footer of page
77
+ add_action( PT_CV_PREFIX_ . 'preview_footer', array( 'PT_CV_Html', 'assets_of_view_types' ) );
78
+
79
+
80
  // Add an action link pointing to the options page.
81
  $plugin_basename = plugin_basename( plugin_dir_path( dirname(__FILE__) ) . $this->plugin_slug . '.php' );
82
  add_filter( 'plugin_action_links_' . $plugin_basename, array( $this, 'filter_add_action_links' ) );
87
  // Filter link of Title in All Views page
88
  add_filter( 'get_edit_post_link', array( $this, 'filter_get_edit_post_link' ), 10, 3 );
89
 
90
+ // Filter Title of Edit View page
91
+ add_filter( 'admin_title', array( $this, 'filter_admin_title' ), 10, 2 );
 
 
 
 
92
 
93
  // Custom hooks for both preview & frontend
94
  PT_CV_Hooks::init();
411
  return $edit_link;
412
  }
413
 
414
+ /**
415
+ * Filter Title for View page
416
+ *
417
+ * @param string $admin_title
418
+ * @param string $title
419
+ */
420
+ public function filter_admin_title( $admin_title, $title ) {
421
+ $screen = get_current_screen();
422
+
423
+ // If is View page
424
+ if ( $this->plugin_screen_hook_suffix == $screen->id || in_array( $screen->id, $this->plugin_sub_screen_hook_suffix ) ) {
425
+ // If View id is passed in url
426
+ if ( ! empty ( $_GET['id'] ) ) {
427
+ $admin_title = str_replace( 'Add New', 'Edit', $admin_title );
428
+ }
429
+ }
430
+
431
+ return $admin_title;
432
+ }
433
+
434
  }
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.1.5
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.1.5' );
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.1.6
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.1.6' );
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.php CHANGED
@@ -405,6 +405,9 @@ if ( ! class_exists( 'PT_CV_Html' ) ) {
405
  // Sets up global post data
406
  setup_postdata( $post );
407
 
 
 
 
408
  // Get content class
409
  $content_class = apply_filters( PT_CV_PREFIX_ . 'field_content_class', PT_CV_PREFIX . 'content' );
410
 
405
  // Sets up global post data
406
  setup_postdata( $post );
407
 
408
+ // Handle the more tag inside content
409
+ do_action( PT_CV_PREFIX_ . 'handle_teaser' );
410
+
411
  // Get content class
412
  $content_class = apply_filters( PT_CV_PREFIX_ . 'field_content_class', PT_CV_PREFIX . 'content' );
413