Inline Related Posts - Version 3.0.6

Version Description

Release Date - 2021-07-13

  • IWP-191 Remove the checkboxes for page support
  • IWP-238 Allow hook priority to be set on the settings page
Download this release

Release Info

Developer IntellyWP
Plugin Icon 128x128 Inline Related Posts
Version 3.0.6
Comparing to
See all releases

Code changes from version 3.0.5 to 3.0.6

includes/admin/settings.php CHANGED
@@ -211,6 +211,7 @@ function irp_ui_settings() {
211
  //$irp->Options->setRewritePostsInBoxCount($irp->Utils->iqs('irpRewritePostsInBoxCount', 1));
212
  $irp->Options->setRewritePostsDays($irp->Utils->iqs('irpRewritePostsDays', 0));
213
  $irp->Options->setRewriteThreshold($irp->Utils->iqs('irpRewriteThreshold', 300));
 
214
  $irp->Options->setRewriteAtEnd($irp->Utils->iqs('irpRewriteAtEnd'));
215
 
216
  $irp->Options->setEngineSearch($irp->Utils->iqs('irpEngineSearch', IRP_ENGINE_SEARCH_CATEGORIES_TAGS));
@@ -298,6 +299,7 @@ function irp_ui_settings() {
298
  $irp->Form->select('irpRewriteBoxesCount', $irp->Options->getRewriteBoxesCount(), $options);
299
  $irp->Form->number('irpRewritePostsDays', $irp->Options->getRewritePostsDays());
300
  $irp->Form->number('irpRewriteThreshold', $irp->Options->getRewriteThreshold(), $args);
 
301
  $irp->Form->checkbox('irpRewriteAtEnd', $irp->Options->isRewriteAtEnd());
302
  $irp->Form->p('');
303
 
211
  //$irp->Options->setRewritePostsInBoxCount($irp->Utils->iqs('irpRewritePostsInBoxCount', 1));
212
  $irp->Options->setRewritePostsDays($irp->Utils->iqs('irpRewritePostsDays', 0));
213
  $irp->Options->setRewriteThreshold($irp->Utils->iqs('irpRewriteThreshold', 300));
214
+ $irp->Options->setHookPriority($irp->Utils->iqs('irpHookPriority', 99999));
215
  $irp->Options->setRewriteAtEnd($irp->Utils->iqs('irpRewriteAtEnd'));
216
 
217
  $irp->Options->setEngineSearch($irp->Utils->iqs('irpEngineSearch', IRP_ENGINE_SEARCH_CATEGORIES_TAGS));
299
  $irp->Form->select('irpRewriteBoxesCount', $irp->Options->getRewriteBoxesCount(), $options);
300
  $irp->Form->number('irpRewritePostsDays', $irp->Options->getRewritePostsDays());
301
  $irp->Form->number('irpRewriteThreshold', $irp->Options->getRewriteThreshold(), $args);
302
+ $irp->Form->number('irpHookPriority', $irp->Options->getHookPriority());
303
  $irp->Form->checkbox('irpRewriteAtEnd', $irp->Options->isRewriteAtEnd());
304
  $irp->Form->p('');
305
 
includes/classes/utils/AppOptions.php CHANGED
@@ -164,6 +164,11 @@ class IRP_AppOptions extends IRP_Options {
164
  }
165
  }
166
  }
 
 
 
 
 
167
  return $result;
168
  }
169
  public function setMetaboxPostTypes($values) {
@@ -215,6 +220,13 @@ class IRP_AppOptions extends IRP_Options {
215
  public function setRewriteThreshold($value) {
216
  $this->setOption('RewriteThreshold', $value);
217
  }
 
 
 
 
 
 
 
218
  //include also a related box in the end?
219
  public function isRewriteAtEnd() {
220
  return $this->getOption('RewriteAtEnd', TRUE);
164
  }
165
  }
166
  }
167
+ // We used to try to apply the automatic IRP to pages even though it never really worked.
168
+ // The unset is here to expunge the value from the database. The unset needs to stay
169
+ // here because a $create will put it back into the database and if it's returned from
170
+ // here, the IRP checkbox will be placed in the page editor.
171
+ unset($result['page']);
172
  return $result;
173
  }
174
  public function setMetaboxPostTypes($values) {
220
  public function setRewriteThreshold($value) {
221
  $this->setOption('RewriteThreshold', $value);
222
  }
223
+ //hook priority
224
+ public function getHookPriority() {
225
+ return intval($this->getOption('HookPriority', 99999));
226
+ }
227
+ public function setHookPriority($value) {
228
+ $this->setOption('HookPriority', $value);
229
+ }
230
  //include also a related box in the end?
231
  public function isRewriteAtEnd() {
232
  return $this->getOption('RewriteAtEnd', TRUE);
includes/classes/utils/Utils.php CHANGED
@@ -262,11 +262,7 @@ class IRP_Utils {
262
  $result[] = array('id' => $v->$id, 'name' => $v->$name);
263
  }
264
  } elseif ($query == IRP_QUERY_POST_TYPES) {
265
- //$options = array('public' => TRUE, '_builtin' => FALSE);
266
- //$q = get_post_types($options, 'names');
267
- $q=array();
268
- $q = array_merge($q, array('post', 'page'));
269
- sort($q);
270
  foreach ($q as $v) {
271
  $result[] = array('id' => $v, 'name' => $v);
272
  }
262
  $result[] = array('id' => $v->$id, 'name' => $v->$name);
263
  }
264
  } elseif ($query == IRP_QUERY_POST_TYPES) {
265
+ $q = array('post'); // we're only supporting posts
 
 
 
 
266
  foreach ($q as $v) {
267
  $result[] = array('id' => $v, 'name' => $v);
268
  }
includes/core.php CHANGED
@@ -218,16 +218,10 @@ function irp_ui_get_box($ids, $options=NULL) {
218
  return $body;
219
  }
220
 
221
- /*add_filter('the_content', 'irp_fix_the_content');
222
- function irp_fix_the_content($content) {
223
- //this is to prevent wrong rewrite of WP of our content
224
- $content=str_replace("<p></a></p>", "</a>", $content);
225
- $content=str_replace("<p></a>", "</a>", $content);
226
- return $content;
227
- }*/
228
- //add_filter('wp_head', 'irp_the_content');
229
- add_filter('the_content', 'irp_the_content', 99999);
230
- function irp_the_content($content) {
231
  global $irp, $post;
232
 
233
  if($irp->Plugin->isActive(IRP_PLUGINS_INTELLY_RELATED_POSTS_PRO)) {
218
  return $body;
219
  }
220
 
221
+ add_filter('the_content', 'irp_the_content', intval(get_option('IRP_HookPriority','99999')));
222
+
223
+ function irp_the_content($content)
224
+ {
 
 
 
 
 
 
225
  global $irp, $post;
226
 
227
  if($irp->Plugin->isActive(IRP_PLUGINS_INTELLY_RELATED_POSTS_PRO)) {
index.php CHANGED
@@ -6,13 +6,13 @@ Description: Inline Related Posts AUTOMATICALLY inserts related posts INSIDE you
6
  Author: IntellyWP
7
  Author URI: http://intellywp.com/
8
  Email: support@intellywp.com
9
- Version: 3.0.5
10
  */
11
  define('IRP_PLUGIN_PREFIX', 'IRP_');
12
  define('IRP_PLUGIN_FILE',__FILE__);
13
  define('IRP_PLUGIN_SLUG', 'intelly-related-posts');
14
  define('IRP_PLUGIN_NAME', 'Inline Related Posts');
15
- define('IRP_PLUGIN_VERSION', '3.0.5');
16
  define('IRP_PLUGIN_AUTHOR', 'IntellyWP');
17
  define('IRP_PLUGIN_ROOT', dirname(__FILE__).'/');
18
  define('IRP_PLUGIN_IMAGES', plugins_url( 'assets/images/', __FILE__ ));
6
  Author: IntellyWP
7
  Author URI: http://intellywp.com/
8
  Email: support@intellywp.com
9
+ Version: 3.0.6
10
  */
11
  define('IRP_PLUGIN_PREFIX', 'IRP_');
12
  define('IRP_PLUGIN_FILE',__FILE__);
13
  define('IRP_PLUGIN_SLUG', 'intelly-related-posts');
14
  define('IRP_PLUGIN_NAME', 'Inline Related Posts');
15
+ define('IRP_PLUGIN_VERSION', '3.0.6');
16
  define('IRP_PLUGIN_AUTHOR', 'IntellyWP');
17
  define('IRP_PLUGIN_ROOT', dirname(__FILE__).'/');
18
  define('IRP_PLUGIN_IMAGES', plugins_url( 'assets/images/', __FILE__ ));
languages/Lang.txt CHANGED
@@ -63,7 +63,7 @@ ActivateError=Errors activating key. Network problem or wrong activation key.
63
  LicenseSection=License information
64
  LicenseSectionSubtitle=Insert the activation key received by email in the text below to see all the settings
65
  MetaboxSection=Metabox integration
66
- MetaboxSectionSubtitle=You will display a metabox to disable the plugin in a specific post or page.
67
  License.metabox=In "<b>{0}</b>"
68
  License.key=Insert the activation key received by email
69
  EmptyTrackingList=Your tracking code list is empty, please <a href="{0}">CLICK HERE</a> to create new ones.
@@ -95,6 +95,7 @@ Settings.irpRewriteActive=Insert in already existing posts?
95
  Settings.irpRewriteBoxesCount=How many boxes per single post?
96
  Settings.irpRewritePostsInBoxCount=Max posts per box N.
97
  Settings.irpRewriteThreshold=Interval between the boxes <i>(minimum N° words)</i>
 
98
  Settings.irpRewriteAtEnd=Insert a box at the end of the post? (if needed)
99
  Settings.irpRewritePostType=Use on <b>{0}</b>
100
  Settings.irpRewritePostsDays=Only posts of last N. days<br /><i>(set zero for no limits)</i>
63
  LicenseSection=License information
64
  LicenseSectionSubtitle=Insert the activation key received by email in the text below to see all the settings
65
  MetaboxSection=Metabox integration
66
+ MetaboxSectionSubtitle=You will display a metabox to disable the plugin in a specific post.
67
  License.metabox=In "<b>{0}</b>"
68
  License.key=Insert the activation key received by email
69
  EmptyTrackingList=Your tracking code list is empty, please <a href="{0}">CLICK HERE</a> to create new ones.
95
  Settings.irpRewriteBoxesCount=How many boxes per single post?
96
  Settings.irpRewritePostsInBoxCount=Max posts per box N.
97
  Settings.irpRewriteThreshold=Interval between the boxes <i>(minimum N° words)</i>
98
+ Settings.irpHookPriority=<strong>the_content</strong> hook priority</i>
99
  Settings.irpRewriteAtEnd=Insert a box at the end of the post? (if needed)
100
  Settings.irpRewritePostType=Use on <b>{0}</b>
101
  Settings.irpRewritePostsDays=Only posts of last N. days<br /><i>(set zero for no limits)</i>
languages/intelly-related-posts-da_DK.mo ADDED
Binary file
languages/intelly-related-posts-da_DK.po ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Intelly Related Posts\n"
4
+ "POT-Creation-Date: 2021-06-11 16:26-0400\n"
5
+ "PO-Revision-Date: 2021-06-16 11:08-0400\n"
6
+ "Language-Team: \n"
7
+ "MIME-Version: 1.0\n"
8
+ "Content-Type: text/plain; charset=UTF-8\n"
9
+ "Content-Transfer-Encoding: 8bit\n"
10
+ "X-Generator: Poedit 2.4.2\n"
11
+ "X-Poedit-Basepath: ..\n"
12
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
13
+ "X-Poedit-KeywordsList: __;_e;esc_attr_e;_x\n"
14
+ "Last-Translator: \n"
15
+ "Language: da_DK\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+
18
+ msgid "READ"
19
+ msgstr "Se også"
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
  === Inline Related Posts ===
2
- Contributors: IntellyWP, data443
3
- Tags: related post,related posts,inline related posts, inside related posts, suggestions, similar post, similar posts, related,contextual, relations, seo, bounce rate, internal links, similarity, related content, inline related post, Zemanta, inline, Related Links, Contextual Related Posts, YARPP recommendation engine, YARPP
4
  Requires at least: 2.7
5
- Tested up to: 5.7
6
 
7
  Inline Related Posts AUTOMATICALLY inserts related posts INSIDE your content, capturing immediately the reader's attention.
8
 
@@ -88,6 +88,12 @@ Absolutely Not! Inline Related Posts is built with lightweight code so you won
88
 
89
  == Changelog ==
90
 
 
 
 
 
 
 
91
  = 3.0.5 =
92
  *Release Date - 2021-06-15*
93
 
1
  === Inline Related Posts ===
2
+ Contributors: IntellyWP, Data443
3
+ Tags: related post, related posts,inline related posts, inside related posts, suggestions, similar post, similar posts, related,contextual, relations, seo, bounce rate, internal links, similarity, related content, inline related post, Zemanta, inline, Related Links, Contextual Related Posts, YARPP recommendation engine, YARPP
4
  Requires at least: 2.7
5
+ Tested up to: 5.8
6
 
7
  Inline Related Posts AUTOMATICALLY inserts related posts INSIDE your content, capturing immediately the reader's attention.
8
 
88
 
89
  == Changelog ==
90
 
91
+ = 3.0.6 =
92
+ *Release Date - 2021-07-13*
93
+
94
+ * IWP-191 Remove the checkboxes for page support
95
+ * IWP-238 Allow hook priority to be set on the settings page
96
+
97
  = 3.0.5 =
98
  *Release Date - 2021-06-15*
99