Version Description
- Fixed non-object bug
- Fixed the index database error after activation
- Related posts query optimization
Download this release
Release Info
Developer | ddksr |
Plugin | WordPress Related Posts |
Version | 3.5.3 |
Comparing to | |
See all releases |
Code changes from version 3.5.2 to 3.5.3
- config.php +9 -2
- init.php +6 -2
- readme.txt +8 -3
- recommendations.php +1 -1
- static/img/arrow_down.png +0 -0
- static/img/arrow_right.png +0 -0
- static/img/desktop_icon.png +0 -0
- static/img/down.png +0 -0
- static/img/mobile_icon.png +0 -0
- static/img/network_icon.png +0 -0
- static/img/outlink.png +0 -0
- static/img/up.png +0 -0
- wp_related_posts.php +1 -1
config.php
CHANGED
@@ -176,8 +176,8 @@ function wp_rp_related_posts_db_table_install() {
|
|
176 |
post_date datetime NOT NULL,
|
177 |
label VARCHAR(" . WP_RP_MAX_LABEL_LENGTH . ") NOT NULL,
|
178 |
weight float,
|
179 |
-
|
180 |
-
|
181 |
);";
|
182 |
|
183 |
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
@@ -252,6 +252,13 @@ function wp_rp_is_classic() {
|
|
252 |
return false;
|
253 |
}
|
254 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
function wp_rp_migrate_3_5_1() {
|
256 |
$meta = get_option('wp_rp_meta');
|
257 |
$meta['version'] = '3.5.2';
|
176 |
post_date datetime NOT NULL,
|
177 |
label VARCHAR(" . WP_RP_MAX_LABEL_LENGTH . ") NOT NULL,
|
178 |
weight float,
|
179 |
+
KEY post_id (post_id),
|
180 |
+
KEY label (label)
|
181 |
);";
|
182 |
|
183 |
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
|
252 |
return false;
|
253 |
}
|
254 |
|
255 |
+
function wp_rp_migrate_3_5_2() {
|
256 |
+
$meta = get_option('wp_rp_meta');
|
257 |
+
$meta['version'] = '3.5.3';
|
258 |
+
$meta['new_user'] = false;
|
259 |
+
update_option('wp_rp_meta', $meta);
|
260 |
+
}
|
261 |
+
|
262 |
function wp_rp_migrate_3_5_1() {
|
263 |
$meta = get_option('wp_rp_meta');
|
264 |
$meta['version'] = '3.5.2';
|
init.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
define('WP_RP_VERSION', '3.5.
|
3 |
|
4 |
define('WP_RP_PLUGIN_FILE', plugin_basename(__FILE__));
|
5 |
|
@@ -75,7 +75,11 @@ global $wp_rp_output;
|
|
75 |
$wp_rp_output = array();
|
76 |
function wp_rp_add_related_posts_hook($content) {
|
77 |
global $wp_rp_output, $post;
|
78 |
-
|
|
|
|
|
|
|
|
|
79 |
$options = wp_rp_get_options();
|
80 |
|
81 |
if ($content != "" && $post->post_type === 'post' && (($options["on_single_post"] && is_single()) || (is_feed() && $options["on_rss"]))) {
|
1 |
<?php
|
2 |
+
define('WP_RP_VERSION', '3.5.3');
|
3 |
|
4 |
define('WP_RP_PLUGIN_FILE', plugin_basename(__FILE__));
|
5 |
|
75 |
$wp_rp_output = array();
|
76 |
function wp_rp_add_related_posts_hook($content) {
|
77 |
global $wp_rp_output, $post;
|
78 |
+
|
79 |
+
if( !is_object($post) ) {
|
80 |
+
return $content;
|
81 |
+
}
|
82 |
+
|
83 |
$options = wp_rp_get_options();
|
84 |
|
85 |
if ($content != "" && $post->post_type === 'post' && (($options["on_single_post"] && is_single()) || (is_feed() && $options["on_rss"]))) {
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: zemanta
|
|
3 |
Tags: related,posts,post,related posts,plugin,seo
|
4 |
License: GPLv2
|
5 |
Requires at least: 3.6
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag: 3.5.
|
8 |
|
9 |
WordPress Related Posts - the plugin for related posts with thumbnails. Caching included.
|
10 |
|
@@ -81,7 +81,7 @@ Before using the plugin please read the full version of [Zemanta Terms of Servic
|
|
81 |
2. WordPress Related Posts responsive theme on a Galaxy Nexus and iPhone 4s.
|
82 |
|
83 |
== Terms of service ==
|
84 |
-
The plugin source code is released under GPLv2. Usage of
|
85 |
|
86 |
== Upgrade Notice ==
|
87 |
|
@@ -93,6 +93,11 @@ Fix for security vulnerability. Upgrade immediately.
|
|
93 |
|
94 |
== Changelog ==
|
95 |
|
|
|
|
|
|
|
|
|
|
|
96 |
= 3.5.2 =
|
97 |
* Fixed excerpt bug
|
98 |
|
3 |
Tags: related,posts,post,related posts,plugin,seo
|
4 |
License: GPLv2
|
5 |
Requires at least: 3.6
|
6 |
+
Tested up to: 4.1
|
7 |
+
Stable tag: 3.5.3
|
8 |
|
9 |
WordPress Related Posts - the plugin for related posts with thumbnails. Caching included.
|
10 |
|
81 |
2. WordPress Related Posts responsive theme on a Galaxy Nexus and iPhone 4s.
|
82 |
|
83 |
== Terms of service ==
|
84 |
+
The plugin source code is released under GPLv2. Usage of our service is governed by [Zemanta Terms of Service](http://www.zemanta.com/legal/terms-of-service/) and [Zemanta Privacy Policy](http://www.zemanta.com/legal/privacy/).
|
85 |
|
86 |
== Upgrade Notice ==
|
87 |
|
93 |
|
94 |
== Changelog ==
|
95 |
|
96 |
+
= 3.5.3 =
|
97 |
+
* Fixed non-object bug
|
98 |
+
* Fixed the index database error after activation
|
99 |
+
* Related posts query optimization
|
100 |
+
|
101 |
= 3.5.2 =
|
102 |
* Fixed excerpt bug
|
103 |
|
recommendations.php
CHANGED
@@ -184,7 +184,7 @@ function wp_rp_fetch_related_posts_v2($limit = 10, $exclude_ids = array()) {
|
|
184 |
$exclude_categories_labels = array();
|
185 |
}
|
186 |
|
187 |
-
$total_number_of_posts = $wpdb->get_col("SELECT count(
|
188 |
if (empty($total_number_of_posts)) {
|
189 |
return array();
|
190 |
}
|
184 |
$exclude_categories_labels = array();
|
185 |
}
|
186 |
|
187 |
+
$total_number_of_posts = $wpdb->get_col("SELECT count(post_id) from (SELECT post_id FROM " . $wpdb->prefix . "wp_rp_tags group by post_id) t;", 0);
|
188 |
if (empty($total_number_of_posts)) {
|
189 |
return array();
|
190 |
}
|
static/img/arrow_down.png
CHANGED
Binary file
|
static/img/arrow_right.png
CHANGED
Binary file
|
static/img/desktop_icon.png
CHANGED
Binary file
|
static/img/down.png
CHANGED
Binary file
|
static/img/mobile_icon.png
CHANGED
Binary file
|
static/img/network_icon.png
CHANGED
Binary file
|
static/img/outlink.png
CHANGED
Binary file
|
static/img/up.png
CHANGED
Binary file
|
wp_related_posts.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WordPress Related Posts
|
4 |
-
Version: 3.5.
|
5 |
Plugin URI: http://wordpress.org/extend/plugins/wordpress-23-related-posts-plugin/
|
6 |
Description: Quickly increase your readers' engagement with your posts by adding Related Posts in the footer of your content. Click on <a href="admin.php?page=wordpress-related-posts">Related Posts tab</a> to configure your settings.
|
7 |
Author: Zemanta Ltd.
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WordPress Related Posts
|
4 |
+
Version: 3.5.3
|
5 |
Plugin URI: http://wordpress.org/extend/plugins/wordpress-23-related-posts-plugin/
|
6 |
Description: Quickly increase your readers' engagement with your posts by adding Related Posts in the footer of your content. Click on <a href="admin.php?page=wordpress-related-posts">Related Posts tab</a> to configure your settings.
|
7 |
Author: Zemanta Ltd.
|