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

Version Description

  • Bug fixed: Can't translate content
Download this release

Release Info

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

Code changes from version 1.6.3.1 to 1.6.4

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, column, 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.2.2
7
- Stable tag: 1.6.3.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -165,6 +165,9 @@ function my_move_bootstrap( $args ) {
165
 
166
  == Changelog ==
167
 
 
 
 
168
  = 1.6.3.1 =
169
  * Improvement: Prevent negative value for some setting options
170
 
4
  Tags: post, posts, page, pages, query, queries, search, display, show, grid, column, 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.2.2
7
+ Stable tag: 1.6.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
165
 
166
  == Changelog ==
167
 
168
+ = 1.6.4 =
169
+ * Bug fixed: Can't translate content
170
+
171
  = 1.6.3.1 =
172
  * Improvement: Prevent negative value for some setting options
173
 
admin/includes/plugin.php CHANGED
@@ -131,7 +131,8 @@ if ( !class_exists( 'PT_CV_Plugin' ) ) {
131
  $new_input = array();
132
 
133
  foreach ( $input as $key => $value ) {
134
- $new_input[ $key ] = sanitize_text_field( $value );
 
135
  }
136
 
137
  return $new_input;
131
  $new_input = array();
132
 
133
  foreach ( $input as $key => $value ) {
134
+ $type = apply_filters( PT_CV_PREFIX_ . 'settings_page_field_sanitize', 'input', $key );
135
+ $new_input[ $key ] = ($type === 'input') ? sanitize_text_field( $value ) : $value;
136
  }
137
 
138
  return $new_input;
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.6.3.1
15
  * Author: PT Guy
16
  * Author URI: http://profiles.wordpress.org/pt-guy
17
  * Text Domain: content-views
@@ -27,7 +27,7 @@ if ( !defined( 'WPINC' ) ) {
27
  /*
28
  * Define Constant
29
  */
30
- define( 'PT_CV_VERSION', '1.6.3.1' );
31
  define( 'PT_CV_FILE', __FILE__ );
32
  $pt_cv_path = plugin_dir_path( __FILE__ );
33
  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.6.4
15
  * Author: PT Guy
16
  * Author URI: http://profiles.wordpress.org/pt-guy
17
  * Text Domain: content-views
27
  /*
28
  * Define Constant
29
  */
30
+ define( 'PT_CV_VERSION', '1.6.4' );
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
@@ -957,15 +957,16 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
957
  *
958
  * @return string
959
  */
960
- static function inline_script( $js, $wrap = true ) {
961
  // Generate random id for script tag
962
  $random_id = PT_CV_Functions::string_random();
963
 
964
  ob_start();
965
  ?>
966
- <script type="text/javascript" id="<?php echo esc_attr( PT_CV_PREFIX . 'inline-script-' . $random_id ); ?>">
967
  <?php
968
- $format = $wrap ? "(function ($) {\n $(function () { %s }); \n}(jQuery));" : '%s';
 
969
  printf( $format, $js );
970
  ?>
971
  </script>
@@ -980,13 +981,13 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
980
  *
981
  * @return string
982
  */
983
- static function inline_style( $css ) {
984
  // Generate random id for style tag
985
  $random_id = PT_CV_Functions::string_random();
986
 
987
  ob_start();
988
  ?>
989
- <style type="text/css" id="<?php echo esc_attr( PT_CV_PREFIX . 'inline-style-' . $random_id ); ?>"><?php echo '' . $css; ?></style>
990
  <?php
991
  return ob_get_clean();
992
  }
957
  *
958
  * @return string
959
  */
960
+ static function inline_script( $js, $wrap = true, $prefix = 'inline' ) {
961
  // Generate random id for script tag
962
  $random_id = PT_CV_Functions::string_random();
963
 
964
  ob_start();
965
  ?>
966
+ <script type="text/javascript" id="<?php echo esc_attr( PT_CV_PREFIX . $prefix . '-script-' . $random_id ); ?>">
967
  <?php
968
+ $newline = "\n";
969
+ $format = $wrap ? "(function($){\$(function(){ {$newline}%s{$newline} });}(jQuery));" : '%s';
970
  printf( $format, $js );
971
  ?>
972
  </script>
981
  *
982
  * @return string
983
  */
984
+ static function inline_style( $css, $prefix = 'inline' ) {
985
  // Generate random id for style tag
986
  $random_id = PT_CV_Functions::string_random();
987
 
988
  ob_start();
989
  ?>
990
+ <style type="text/css" id="<?php echo esc_attr( PT_CV_PREFIX . $prefix . '-style-' . $random_id ); ?>"><?php echo '' . $css; ?></style>
991
  <?php
992
  return ob_get_clean();
993
  }
public/content-views.php CHANGED
@@ -227,9 +227,13 @@ class PT_Content_Views {
227
  * @since 1.0.0
228
  */
229
  public function load_plugin_textdomain() {
230
- $domain = $this->plugin_slug;
 
 
231
 
232
- // Load translation file in wp-content/languages/content-views/
 
 
233
  load_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( PT_CV_FILE ) ) . '/languages/' );
234
  }
235
 
227
  * @since 1.0.0
228
  */
229
  public function load_plugin_textdomain() {
230
+ $domain = PT_CV_DOMAIN;
231
+ // WPLANG is no longer needed since 4.0
232
+ $locale = get_locale();
233
 
234
+ // Load mo file from wp-content/languages/content-views/
235
+ load_textdomain( $domain, WP_LANG_DIR . "/{$domain}/{$domain}-{$locale}.mo" );
236
+ // Load mo file from sub-folder /languages of this plugin
237
  load_plugin_textdomain( $domain, FALSE, dirname( plugin_basename( PT_CV_FILE ) ) . '/languages/' );
238
  }
239