Version Description
- Turned the credit option to false by default. This setting won't effect current users.
- Turned off borders on post thumbnails. You can customise the CSS class "crp_thumb" to style the post thumbnail
- From the next version, the plugin will display update information in your WP-Admin
Download this release
Release Info
Developer | Ajay |
Plugin | Contextual Related Posts |
Version | 1.6.2 |
Comparing to | |
See all releases |
Code changes from version 1.6.1 to 1.6.2
- contextual-related-posts.php +26 -5
- languages/crp-da_DK.mo +0 -0
- languages/crp-da_DK.po +1 -1
- languages/crp-de_DE.mo +0 -0
- languages/crp-de_DE.po +1 -1
- languages/crp-en_US.mo +0 -0
- languages/crp-en_US.po +1 -1
- languages/crp-en_US.pot +1 -1
- languages/crp-it_IT.mo +0 -0
- languages/crp-it_IT.po +2 -2
- readme.txt +11 -1
- update-info.txt +2 -0
contextual-related-posts.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Contextual Related Posts
|
4 |
-
Version: 1.6.
|
5 |
Plugin URI: http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/
|
6 |
Description: Show user defined number of contextually related posts. Based on the plugin by <a href="http://weblogtoolscollection.com">Mark Ghosh</a>. <a href="options-general.php?page=crp_options">Configure...</a>
|
7 |
Author: Ajay D'Souza
|
@@ -96,7 +96,7 @@ function ald_crp() {
|
|
96 |
if (($crp_settings['post_thumb_op']=='inline')||($crp_settings['post_thumb_op']=='thumbs_only')) {
|
97 |
$output .= '<a href="'.get_permalink($search->ID).'" rel="bookmark">';
|
98 |
if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail($search->ID))) {
|
99 |
-
$output .= get_the_post_thumbnail( $search->ID, array($crp_settings[thumb_width],$crp_settings[thumb_height]), array('title' => $title,'alt' => $title,'class' => 'crp_thumb'));
|
100 |
} else {
|
101 |
$postimage = get_post_meta($search->ID, $crp_settings[thumb_meta], true);
|
102 |
if ((!$postimage)&&($crp_settings['scan_images'])) {
|
@@ -107,7 +107,7 @@ function ald_crp() {
|
|
107 |
}
|
108 |
}
|
109 |
if (!$postimage) $postimage = $crp_settings[thumb_default];
|
110 |
-
$output .= '<img src="'.$postimage.'" alt="'.$title.'" title="'.$title.'" width="'.$crp_settings[thumb_width].'" height="'.$crp_settings[thumb_height].'" class="crp_thumb" />';
|
111 |
}
|
112 |
$output .= '</a> ';
|
113 |
}
|
@@ -175,7 +175,7 @@ function crp_default_options() {
|
|
175 |
add_to_page => false, // Add related posts to content (only on single pages)
|
176 |
add_to_feed => true, // Add related posts to feed
|
177 |
limit => '5', // How many posts to display?
|
178 |
-
show_credit =>
|
179 |
match_content => true, // Match against post content as well as title
|
180 |
exclude_pages => true, // Exclude Pages
|
181 |
blank_output => true, // Blank output?
|
@@ -260,7 +260,8 @@ if (is_admin() || strstr($_SERVER['PHP_SELF'], 'wp-admin/')) {
|
|
260 |
|
261 |
// Add meta links
|
262 |
function crp_plugin_actions( $links, $file ) {
|
263 |
-
$plugin
|
|
|
264 |
|
265 |
// create link
|
266 |
if ($file == $plugin) {
|
@@ -275,6 +276,26 @@ if ( version_compare( $wp_version, '2.8alpha', '>' ) )
|
|
275 |
add_filter( 'plugin_row_meta', 'crp_plugin_actions', 10, 2 ); // only 2.8 and higher
|
276 |
else add_filter( 'plugin_action_links', 'crp_plugin_actions', 10, 2 );
|
277 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
}
|
279 |
|
|
|
|
|
|
|
280 |
?>
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Contextual Related Posts
|
4 |
+
Version: 1.6.2
|
5 |
Plugin URI: http://ajaydsouza.com/wordpress/plugins/contextual-related-posts/
|
6 |
Description: Show user defined number of contextually related posts. Based on the plugin by <a href="http://weblogtoolscollection.com">Mark Ghosh</a>. <a href="options-general.php?page=crp_options">Configure...</a>
|
7 |
Author: Ajay D'Souza
|
96 |
if (($crp_settings['post_thumb_op']=='inline')||($crp_settings['post_thumb_op']=='thumbs_only')) {
|
97 |
$output .= '<a href="'.get_permalink($search->ID).'" rel="bookmark">';
|
98 |
if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail($search->ID))) {
|
99 |
+
$output .= get_the_post_thumbnail( $search->ID, array($crp_settings[thumb_width],$crp_settings[thumb_height]), array('title' => $title,'alt' => $title,'class' => 'crp_thumb','border' => '0'));
|
100 |
} else {
|
101 |
$postimage = get_post_meta($search->ID, $crp_settings[thumb_meta], true);
|
102 |
if ((!$postimage)&&($crp_settings['scan_images'])) {
|
107 |
}
|
108 |
}
|
109 |
if (!$postimage) $postimage = $crp_settings[thumb_default];
|
110 |
+
$output .= '<img src="'.$postimage.'" alt="'.$title.'" title="'.$title.'" width="'.$crp_settings[thumb_width].'" height="'.$crp_settings[thumb_height].'" border="0" class="crp_thumb" />';
|
111 |
}
|
112 |
$output .= '</a> ';
|
113 |
}
|
175 |
add_to_page => false, // Add related posts to content (only on single pages)
|
176 |
add_to_feed => true, // Add related posts to feed
|
177 |
limit => '5', // How many posts to display?
|
178 |
+
show_credit => false, // Link to this plugin's page?
|
179 |
match_content => true, // Match against post content as well as title
|
180 |
exclude_pages => true, // Exclude Pages
|
181 |
blank_output => true, // Blank output?
|
260 |
|
261 |
// Add meta links
|
262 |
function crp_plugin_actions( $links, $file ) {
|
263 |
+
static $plugin;
|
264 |
+
if (!$plugin) $plugin = plugin_basename(__FILE__);
|
265 |
|
266 |
// create link
|
267 |
if ($file == $plugin) {
|
276 |
add_filter( 'plugin_row_meta', 'crp_plugin_actions', 10, 2 ); // only 2.8 and higher
|
277 |
else add_filter( 'plugin_action_links', 'crp_plugin_actions', 10, 2 );
|
278 |
|
279 |
+
add_action('after_plugin_row', 'crp_add_plugin_row', 10, 2);
|
280 |
+
function crp_add_plugin_row($links, $file) {
|
281 |
+
static $plugin;
|
282 |
+
global $wp_version;
|
283 |
+
if (!$plugin) $plugin = plugin_basename(__FILE__);
|
284 |
+
|
285 |
+
if ($file == $plugin ){
|
286 |
+
$current = get_option('update_plugins');
|
287 |
+
if (!isset($current->response[$file])) return false;
|
288 |
+
|
289 |
+
$columns = substr($wp_version, 0, 3) >= "2.8" ? 3 : 5;
|
290 |
+
$url = "http://svn.wp-plugins.org/contextual-related-posts/trunk/update-info.txt";
|
291 |
+
$update = wp_remote_fopen($url);
|
292 |
+
echo '<td colspan="'.$columns.'">';
|
293 |
+
echo $update;
|
294 |
+
echo '</td>';
|
295 |
+
}
|
296 |
}
|
297 |
|
298 |
+
|
299 |
+
} // End admin.inc
|
300 |
+
|
301 |
?>
|
languages/crp-da_DK.mo
CHANGED
Binary file
|
languages/crp-da_DK.po
CHANGED
@@ -2,7 +2,7 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contextual Related Posts 1.5.1\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2010-02-
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
|
8 |
"Language-Team: Team Blogos <wordpress@blogos.dk>\n"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contextual Related Posts 1.5.1\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2010-02-20 11:50+0530\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
|
8 |
"Language-Team: Team Blogos <wordpress@blogos.dk>\n"
|
languages/crp-de_DE.mo
CHANGED
Binary file
|
languages/crp-de_DE.po
CHANGED
@@ -2,7 +2,7 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contextual Related Posts\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2010-02-
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
|
8 |
"Language-Team: <me@ajaydsouza.com>\n"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contextual Related Posts\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2010-02-20 11:50+0530\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
|
8 |
"Language-Team: <me@ajaydsouza.com>\n"
|
languages/crp-en_US.mo
CHANGED
Binary file
|
languages/crp-en_US.po
CHANGED
@@ -2,7 +2,7 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contextual Related Posts\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2010-02-
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
|
8 |
"Language-Team: <me@ajaydsouza.com>\n"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contextual Related Posts\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2010-02-20 11:50+0530\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
|
8 |
"Language-Team: <me@ajaydsouza.com>\n"
|
languages/crp-en_US.pot
CHANGED
@@ -2,7 +2,7 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contextual Related Posts\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2010-02-
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
|
8 |
"Language-Team: <me@ajaydsouza.com>\n"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contextual Related Posts\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2010-02-20 11:50+0530\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
|
8 |
"Language-Team: <me@ajaydsouza.com>\n"
|
languages/crp-it_IT.mo
CHANGED
Binary file
|
languages/crp-it_IT.po
CHANGED
@@ -2,9 +2,9 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contextual Related Posts in italiano\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2010-02-
|
6 |
"PO-Revision-Date: \n"
|
7 |
-
"Last-Translator:
|
8 |
"Language-Team: Gianni Diurno | http://gidibao.net/ <gidibao@gmail.com>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Contextual Related Posts in italiano\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: 2010-02-20 11:50+0530\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
+
"Last-Translator: Ajay D'Souza <me@ajaydsouza.com>\n"
|
8 |
"Language-Team: Gianni Diurno | http://gidibao.net/ <gidibao@gmail.com>\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Contributors: Ajay, Mark Ghosh
|
|
4 |
Donate link: http://ajaydsouza.com/donate/
|
5 |
Stable tag: trunk
|
6 |
Requires at least: 2.5
|
7 |
-
Tested up to: 2.9.
|
8 |
|
9 |
|
10 |
Show user defined number of contextually related posts
|
@@ -32,6 +32,11 @@ Now, you can choose to exclude posts from certain categories as well as exclude
|
|
32 |
|
33 |
== Changelog ==
|
34 |
|
|
|
|
|
|
|
|
|
|
|
35 |
= 1.6.1 =
|
36 |
* Fixed: Custom output was not detecting styles properly
|
37 |
* Fixed: Incorrect XHTML code was being generated when using special characters in the post title
|
@@ -93,6 +98,11 @@ Now, you can choose to exclude posts from certain categories as well as exclude
|
|
93 |
= 1.0.1 =
|
94 |
* Release
|
95 |
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
== Installation ==
|
98 |
|
4 |
Donate link: http://ajaydsouza.com/donate/
|
5 |
Stable tag: trunk
|
6 |
Requires at least: 2.5
|
7 |
+
Tested up to: 2.9.2
|
8 |
|
9 |
|
10 |
Show user defined number of contextually related posts
|
32 |
|
33 |
== Changelog ==
|
34 |
|
35 |
+
= 1.6.2 =
|
36 |
+
* Turned the credit option to false by default. This setting won't effect current users.
|
37 |
+
* Turned off borders on post thumbnails. You can customise the CSS class "crp_thumb" to style the post thumbnail
|
38 |
+
* From the next version, the plugin will display update information in your WP-Admin
|
39 |
+
|
40 |
= 1.6.1 =
|
41 |
* Fixed: Custom output was not detecting styles properly
|
42 |
* Fixed: Incorrect XHTML code was being generated when using special characters in the post title
|
98 |
= 1.0.1 =
|
99 |
* Release
|
100 |
|
101 |
+
== Upgrade Notice ==
|
102 |
+
|
103 |
+
= 1.6.2 =
|
104 |
+
Turned the credit option to false by default. This setting won't effect current users.
|
105 |
+
Turned off borders on post thumbnails. You can customise the CSS class "crp_thumb" to style the post thumbnail.
|
106 |
|
107 |
== Installation ==
|
108 |
|
update-info.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
Turned the credit option to false by default. This setting won't effect current users.
|
2 |
+
Turned off borders on post thumbnails. You can customise the CSS class "crp_thumb" to style the post thumbnail.
|