Related Posts for WordPress - Version 1.9.0

Version Description

Download this release

Release Info

Developer barrykooij
Plugin Icon 128x128 Related Posts for WordPress
Version 1.9.0
Comparing to
See all releases

Code changes from version 1.8.2 to 1.9.0

Files changed (47) hide show
  1. assets/css/edit-post.css +1 -1
  2. assets/css/install.css +1 -1
  3. assets/css/{edit-post.less → scss/edit-post.scss} +1 -1
  4. assets/css/{install.less → scss/install.scss} +14 -7
  5. assets/css/{settings.less → scss/settings.scss} +20 -7
  6. assets/css/settings.css +1 -1
  7. assets/js/install.js +15 -2
  8. assets/js/install.min.js +1 -1
  9. assets/js/settings.js +13 -1
  10. assets/js/settings.min.js +1 -1
  11. classes/class-autoloader.php +0 -65
  12. classes/class-link-related-table.php +38 -13
  13. classes/class-manager-filter.php +12 -20
  14. classes/class-manager-hook.php +16 -15
  15. classes/class-post-link-manager.php +17 -6
  16. classes/class-related-post-manager.php +21 -3
  17. classes/class-related-word-manager.php +12 -23
  18. classes/class-rp4wp.php +5 -25
  19. classes/filters/class-filter-set-screen-option.php +27 -0
  20. classes/hooks/class-hook-ajax-install-link-posts.php +3 -3
  21. classes/hooks/class-hook-link-related-screen.php +15 -1
  22. classes/hooks/class-hook-meta-box-ajax-sort.php +1 -1
  23. classes/hooks/class-hook-page-install.php +22 -5
  24. classes/hooks/class-hook-settings-page.php +77 -34
  25. classes/hooks/class-hook-shortcode.php +7 -4
  26. classes/ignored-words/bg_BG.php +7 -0
  27. classes/ignored-words/cs_CZ.php +7 -0
  28. classes/ignored-words/es_ES.php +7 -0
  29. classes/ignored-words/nb_NO.php +7 -0
  30. classes/ignored-words/pt_BR.php +7 -0
  31. classes/ignored-words/ru_RU.php +7 -0
  32. classes/ignored-words/sv_SE.php +7 -0
  33. classes/settings/class-settings.php +19 -26
  34. composer.lock +50 -0
  35. includes/actions.php +20 -0
  36. includes/filters.php +7 -0
  37. includes/functions.php +11 -0
  38. readme.txt +28 -6
  39. related-posts-for-wp.php +5 -4
  40. vendor/autoload_52.php +7 -0
  41. vendor/composer/ClassLoader.php +413 -0
  42. vendor/composer/ClassLoader52.php +271 -0
  43. vendor/composer/autoload_classmap.php +47 -0
  44. vendor/composer/autoload_namespaces.php +10 -0
  45. vendor/composer/autoload_psr4.php +9 -0
  46. vendor/composer/autoload_real.php +50 -0
  47. vendor/composer/autoload_real_52.php +44 -0
assets/css/edit-post.css CHANGED
@@ -1 +1 @@
1
- .rp4wp_table_manage.sortable tr{cursor:move}.rp4wp_table_manage.sortable tr td{background-position:98% 50%;background-image:url(../images/grabber.png);background-repeat:no-repeat}.rp4wp_table_manage td{padding-bottom:11px}.rp4wp_table_manage tr:nth-child(odd){background-color:#FCFCFC}.rp4wp_button_holder{padding:10px 0;float:right}.rp4wp_button_holder span{margin-left:10px;float:left}.rp4wp_save_button{float:right}.rp4wp_ajaxloader{height:13px;margin-left:10px}
1
+ .rp4wp_table_manage.sortable tr{cursor:move}.rp4wp_table_manage.sortable tr td{background-position:98% 50%;background-image:url(../../images/grabber.png);background-repeat:no-repeat}.rp4wp_table_manage td{padding-bottom:11px}.rp4wp_table_manage tr:nth-child(odd){background-color:#FCFCFC}.rp4wp_button_holder{padding:10px 0;float:right}.rp4wp_button_holder span{margin-left:10px;float:left}.rp4wp_save_button{float:right}.rp4wp_ajaxloader{height:13px;margin-left:10px}
assets/css/install.css CHANGED
@@ -1 +1 @@
1
- .install-steps li{width:33%;padding:10px 15px;font-weight:700;color:#eee;background:#222;float:left;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.install-steps li.step-bar-active{background:#0074a2}.install-steps li:first-child{margin-left:0}.rp4wp-step #progressbar span{line-height:28px;display:block;text-align:right;padding-right:10px;color:#3B3B3B}.rp4wp-step .rp4wp-install-link-box label{padding-right:20px}.rp4wp-step .rp4wp-install-link-box input{width:40px;text-align:center}.rp4wp-step .rp4wp-install-link-box a.rp4wp-link-now-btn{margin-left:20px;margin-right:10px}.rp4wp-step .rp4wp-box-upgrade{background:#222;color:#ddd;margin:25px 0 0;padding:20px 20px 10px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.rp4wp-step .rp4wp-box-upgrade h3{color:#fff;border:0;padding:0;margin:0}.rp4wp-step .rp4wp-box-upgrade a{color:#2ea2cc;font-weight:700}.rp4wp-install-link-box{display:inline;padding:15px;border:1px solid #0074a2}.rp4wp-step-2 #progressbar{margin-top:30px}
1
+ .install-steps li{width:33%;padding:10px 15px;font-weight:700;color:#eee;background:#222;float:left;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.install-steps li.step-bar-active{background:#0074a2}.install-steps li:first-child{margin-left:0}.rp4wp-step #progress-container{display:none;margin:20px 0 0}.rp4wp-step #progress-container p{font-weight:700}.rp4wp-step #progress-container #progressbar span{line-height:28px;display:block;text-align:right;padding-right:10px;color:#3B3B3B}.rp4wp-step .rp4wp-install-link-box label{padding-right:20px}.rp4wp-step .rp4wp-install-link-box input{width:40px;text-align:center}.rp4wp-step .rp4wp-install-link-box a.rp4wp-link-now-btn{margin-left:20px;margin-right:10px}.rp4wp-step .rp4wp-box-upgrade{background:#222;color:#ddd;margin:25px 0 0;padding:20px 20px 10px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.rp4wp-step .rp4wp-box-upgrade h3{color:#fff;border:0;padding:0;margin:0}.rp4wp-step .rp4wp-box-upgrade a{color:#2ea2cc;font-weight:700}.rp4wp-install-link-box{display:inline;padding:15px;border:1px solid #0074a2}.rp4wp-step-2 #progressbar{margin-top:30px}
assets/css/{edit-post.less → scss/edit-post.scss} RENAMED
@@ -3,7 +3,7 @@
3
  cursor: move;
4
  td {
5
  background-position: 98% 50%;
6
- background-image: url('../images/grabber.png');
7
  background-repeat: no-repeat;
8
  }
9
  }
3
  cursor: move;
4
  td {
5
  background-position: 98% 50%;
6
+ background-image: url('../../images/grabber.png');
7
  background-repeat: no-repeat;
8
  }
9
  }
assets/css/{install.less → scss/install.scss} RENAMED
@@ -22,13 +22,20 @@
22
 
23
  .rp4wp-step {
24
 
25
- #progressbar {
26
- span {
27
- line-height: 28px;
28
- display: block;
29
- text-align: right;
30
- padding-right: 10px;
31
- color: #3B3B3B;
 
 
 
 
 
 
 
32
  }
33
  }
34
 
22
 
23
  .rp4wp-step {
24
 
25
+ #progress-container {
26
+ display: none;
27
+ margin: 20px 0 0;
28
+ p {
29
+ font-weight: bold;
30
+ }
31
+ #progressbar {
32
+ span {
33
+ line-height: 28px;
34
+ display: block;
35
+ text-align: right;
36
+ padding-right: 10px;
37
+ color: #3B3B3B;
38
+ }
39
  }
40
  }
41
 
assets/css/{settings.less → scss/settings.scss} RENAMED
@@ -3,6 +3,14 @@
3
  float: left;
4
  box-sizing: border-box;
5
 
 
 
 
 
 
 
 
 
6
  input.rp4wp-input-text {
7
  width: 100%;
8
  }
@@ -37,10 +45,11 @@
37
  .rp4wp-box {
38
  margin-bottom: 20px;
39
 
40
- .rp4wp-sidebar-header {
41
- line-height: 0;
42
- border-bottom: 2px solid #005592;
43
  }
 
44
  }
45
 
46
  .rp4wp-box-upgrade {
@@ -58,10 +67,14 @@
58
  margin: 0;
59
  }
60
 
61
- a {
62
- color: #2ea2cc;
63
- font-weight: bold;
64
- }
 
 
 
 
65
  }
66
 
67
  }
3
  float: left;
4
  box-sizing: border-box;
5
 
6
+ .rp4wp-settings-section {
7
+ display: none;
8
+ }
9
+
10
+ #rp4wp-settings-general {
11
+ display: block;
12
+ }
13
+
14
  input.rp4wp-input-text {
15
  width: 100%;
16
  }
45
  .rp4wp-box {
46
  margin-bottom: 20px;
47
 
48
+ h3.rp4wp-title {
49
+ padding-bottom: 5px;
50
+ border-bottom: 1px solid #ccc;
51
  }
52
+
53
  }
54
 
55
  .rp4wp-box-upgrade {
67
  margin: 0;
68
  }
69
 
70
+ ul {
71
+ list-style: square;
72
+ margin-left: 20px;
73
+ }
74
+
75
+ a.button-primary {
76
+ font-weight: bold;
77
+ }
78
  }
79
 
80
  }
assets/css/settings.css CHANGED
@@ -1 +1 @@
1
- .rp4wp-content{width:65%;float:left;box-sizing:border-box}.rp4wp-content input.rp4wp-input-text{width:100%}.rp4wp-content textarea{width:100%;height:150px}.rp4wp-content small{color:orange}.rp4wp-content .rp4wp-description{display:block;margin:5px 0;line-height:1.4em;color:#666;font-style:italic}.rp4wp-sidebar{width:33%;margin-left:2%;padding:0 0 0 2%;border-left:1px solid #ccc;float:left;box-sizing:border-box}.rp4wp-sidebar .rp4wp-box{margin-bottom:20px}.rp4wp-sidebar .rp4wp-box .rp4wp-sidebar-header{line-height:0;border-bottom:2px solid #005592}.rp4wp-sidebar .rp4wp-box-upgrade{background:#222;color:#ddd;padding:20px 20px 10px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.rp4wp-sidebar .rp4wp-box-upgrade h3{color:#fff;border:0;padding:0;margin:0}.rp4wp-sidebar .rp4wp-box-upgrade a{color:#2ea2cc;font-weight:700}
1
+ .rp4wp-content{width:65%;float:left;box-sizing:border-box}.rp4wp-content .rp4wp-settings-section{display:none}.rp4wp-content #rp4wp-settings-general{display:block}.rp4wp-content input.rp4wp-input-text{width:100%}.rp4wp-content textarea{width:100%;height:150px}.rp4wp-content small{color:orange}.rp4wp-content .rp4wp-description{display:block;margin:5px 0;line-height:1.4em;color:#666;font-style:italic}.rp4wp-sidebar{width:33%;margin-left:2%;padding:0 0 0 2%;border-left:1px solid #ccc;float:left;box-sizing:border-box}.rp4wp-sidebar .rp4wp-box{margin-bottom:20px}.rp4wp-sidebar .rp4wp-box h3.rp4wp-title{padding-bottom:5px;border-bottom:1px solid #ccc}.rp4wp-sidebar .rp4wp-box-upgrade{background:#222;color:#ddd;padding:20px 20px 10px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.rp4wp-sidebar .rp4wp-box-upgrade h3{color:#fff;border:0;padding:0;margin:0}.rp4wp-sidebar .rp4wp-box-upgrade ul{list-style:square;margin-left:20px}.rp4wp-sidebar .rp4wp-box-upgrade a.button-primary{font-weight:700}
assets/js/install.js CHANGED
@@ -75,7 +75,17 @@ jQuery( document ).ready( function ( $ ) {
75
  };
76
 
77
  this.do_progressbar = function ( posts_left ) {
78
- var progress = Math.round( ( ( this.total_posts - posts_left ) / this.total_posts ) * 100 );
 
 
 
 
 
 
 
 
 
 
79
  if ( progress > 0 ) {
80
  this.percentage_object.html( progress + '%' );
81
  $( '#progressbar' ).progressbar( { value: progress } );
@@ -92,7 +102,7 @@ jQuery( document ).ready( function ( $ ) {
92
  $( '#progressbar' ).find( 'div:first' ).append( this.percentage_object );
93
 
94
  // Set the current progress
95
- this.do_progressbar( $( '#rp4wp_uncached_posts' ).val() );
96
 
97
  // Get the total posts
98
  this.total_posts = $( '#rp4wp_total_posts' ).val();
@@ -112,6 +122,9 @@ jQuery( document ).ready( function ( $ ) {
112
  break;
113
  }
114
 
 
 
 
115
  // Do the first request
116
  this.do_request();
117
  };
75
  };
76
 
77
  this.do_progressbar = function ( posts_left ) {
78
+
79
+ var posts_done = (this.total_posts - posts_left);
80
+
81
+ if ( posts_done < 0 ) {
82
+ posts_done = 0;
83
+ }
84
+
85
+ jQuery( '#progress-done' ).html( posts_done );
86
+ jQuery( '#progress-todo' ).html( posts_left );
87
+
88
+ var progress = Math.round( ( posts_done / this.total_posts ) * 100 );
89
  if ( progress > 0 ) {
90
  this.percentage_object.html( progress + '%' );
91
  $( '#progressbar' ).progressbar( { value: progress } );
102
  $( '#progressbar' ).find( 'div:first' ).append( this.percentage_object );
103
 
104
  // Set the current progress
105
+ this.do_progressbar( $( '#rp4wp_posts_todo' ).val() );
106
 
107
  // Get the total posts
108
  this.total_posts = $( '#rp4wp_total_posts' ).val();
122
  break;
123
  }
124
 
125
+ // show process container
126
+ jQuery( '#progress-container' ).show();
127
+
128
  // Do the first request
129
  this.do_request();
130
  };
assets/js/install.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){function b(b){this.step=b,this.total_posts=0,this.ppr=null,this.action=null,this.percentage_object=null,this.nonce=null,this.do_request=function(){var b=this;a.post(ajaxurl,{action:this.action,nonce:a("#rp4wp-ajax-nonce").val(),ppr:this.ppr,rel_amount:a("#rp4wp_related_posts_amount").val()},function(a){var c=new RegExp("^[0-9]+$");if(a=a.trim(),c.test(a)){var d=parseInt(a);b.do_progressbar(d),d>0?b.do_request():b.done()}else alert("Woops! Something went wrong while linking.\n\nResponse:\n\n"+a)})},this.done=function(){a("#progressbar").progressbar({value:100}),window.location=a("#rp4wp_admin_url").val()+"?page=rp4wp_install&rp4wp_nonce="+this.nonce+"&step="+(this.step+1)},this.do_progressbar=function(b){var c=Math.round((this.total_posts-b)/this.total_posts*100);c>0&&(this.percentage_object.html(c+"%"),a("#progressbar").progressbar({value:c}))},this.init=function(){switch(a("#progressbar").progressbar({value:!1}),this.percentage_object=jQuery("<span>"),a("#progressbar").find("div:first").append(this.percentage_object),this.do_progressbar(a("#rp4wp_uncached_posts").val()),this.total_posts=a("#rp4wp_total_posts").val(),this.nonce=a("#rp4wp_nonce").val(),this.step){case 1:this.ppr=25,this.action="rp4wp_install_save_words";break;case 2:this.ppr=5,this.action="rp4wp_install_link_posts"}this.do_request()},this.init()}var c=a(".rp4wp-step").attr("rel");1==c?b(1):2==c&&a("#rp4wp-link-now").click(function(){b(2)})});
1
+ jQuery(document).ready(function(a){function b(b){this.step=b,this.total_posts=0,this.ppr=null,this.action=null,this.percentage_object=null,this.nonce=null,this.do_request=function(){var b=this;a.post(ajaxurl,{action:this.action,nonce:a("#rp4wp-ajax-nonce").val(),ppr:this.ppr,rel_amount:a("#rp4wp_related_posts_amount").val()},function(a){var c=new RegExp("^[0-9]+$");if(a=a.trim(),c.test(a)){var d=parseInt(a);b.do_progressbar(d),d>0?b.do_request():b.done()}else alert("Woops! Something went wrong while linking.\n\nResponse:\n\n"+a)})},this.done=function(){a("#progressbar").progressbar({value:100}),window.location=a("#rp4wp_admin_url").val()+"?page=rp4wp_install&rp4wp_nonce="+this.nonce+"&step="+(this.step+1)},this.do_progressbar=function(b){var c=this.total_posts-b;0>c&&(c=0),jQuery("#progress-done").html(c),jQuery("#progress-todo").html(b);var d=Math.round(c/this.total_posts*100);d>0&&(this.percentage_object.html(d+"%"),a("#progressbar").progressbar({value:d}))},this.init=function(){switch(a("#progressbar").progressbar({value:!1}),this.percentage_object=jQuery("<span>"),a("#progressbar").find("div:first").append(this.percentage_object),this.do_progressbar(a("#rp4wp_posts_todo").val()),this.total_posts=a("#rp4wp_total_posts").val(),this.nonce=a("#rp4wp_nonce").val(),this.step){case 1:this.ppr=25,this.action="rp4wp_install_save_words";break;case 2:this.ppr=5,this.action="rp4wp_install_link_posts"}jQuery("#progress-container").show(),this.do_request()},this.init()}var c=a(".rp4wp-step").attr("rel");1==c?b(1):2==c&&a("#rp4wp-link-now").click(function(){b(2)})});
assets/js/settings.js CHANGED
@@ -7,6 +7,18 @@ jQuery( function ( $ ) {
7
  rp4wp_is_submitting = true;
8
  $( this ).find( '#submit' ).attr( 'disabled', 'disabled' ).val( 'Saving ...' );
9
  return true;
10
- } )
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  } );
7
  rp4wp_is_submitting = true;
8
  $( this ).find( '#submit' ).attr( 'disabled', 'disabled' ).val( 'Saving ...' );
9
  return true;
10
+ } );
11
+
12
+
13
+ $( '.nav-tab-wrapper a' ).click( function () {
14
+ $( '.rp4wp-settings-section' ).hide();
15
+ $( '.nav-tab-active' ).removeClass( 'nav-tab-active' );
16
+ $( $( this ).attr( 'href' ) ).show();
17
+ $( this ).addClass( 'nav-tab-active' );
18
+ return false;
19
+ } );
20
+
21
+ $( '.nav-tab-wrapper a:first' ).click();
22
+
23
 
24
  } );
assets/js/settings.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){var b=!1;a("#rp4wp-settings-form").submit(function(){return b?!1:(b=!0,a(this).find("#submit").attr("disabled","disabled").val("Saving ..."),!0)})});
1
+ jQuery(function(a){var b=!1;a("#rp4wp-settings-form").submit(function(){return b?!1:(b=!0,a(this).find("#submit").attr("disabled","disabled").val("Saving ..."),!0)}),a(".nav-tab-wrapper a").click(function(){return a(".rp4wp-settings-section").hide(),a(".nav-tab-active").removeClass("nav-tab-active"),a(a(this).attr("href")).show(),a(this).addClass("nav-tab-active"),!1}),a(".nav-tab-wrapper a:first").click()});
classes/class-autoloader.php DELETED
@@ -1,65 +0,0 @@
1
- <?php
2
-
3
- if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
- } // Exit if accessed directly
6
-
7
- class RP4WP_Autoloader {
8
-
9
- private $path;
10
-
11
- /**
12
- * The Constructor, sets the path of the class directory.
13
- *
14
- * @param $path
15
- */
16
- public function __construct( $path ) {
17
- $this->path = $path;
18
- }
19
-
20
-
21
- /**
22
- * Autoloader load method. Load the class.
23
- *
24
- * @param $class_name
25
- */
26
- public function load( $class_name ) {
27
-
28
- // Only autoload WooCommerce Sales Report Email classes
29
- if ( 0 === strpos( $class_name, 'RP4WP_' ) ) {
30
-
31
- // String to lower
32
- $class_name = strtolower( $class_name );
33
-
34
- // Format file name
35
- $file_name = 'class-' . str_ireplace( '_', '-', str_ireplace( 'RP4WP_', '', $class_name ) ) . '.php';
36
-
37
- // Setup the file path
38
- $file_path = $this->path;
39
-
40
- // Check if we need to extend the class path
41
- if ( strpos( $class_name, 'rp4wp_hook' ) === 0 ) {
42
- $file_path .= 'hooks/';
43
- } elseif ( strpos( $class_name, 'rp4wp_filter' ) === 0 ) {
44
- $file_path .= 'filters/';
45
- } elseif ( strpos( $class_name, 'rp4wp_meta_box' ) === 0 ) {
46
- $file_path .= 'meta-boxes/';
47
- } elseif ( strpos( $class_name, 'rp4wp_settings' ) === 0 ) {
48
- $file_path .= 'settings/';
49
- } elseif ( strpos( $class_name, 'rp4wp_theme' ) === 0 ) {
50
- $file_path .= 'themes/';
51
- }
52
-
53
- // Append file name to clas path
54
- $file_path .= $file_name;
55
-
56
- // Check & load file
57
- if ( file_exists( $file_path ) ) {
58
- require_once( $file_path );
59
- }
60
-
61
- }
62
-
63
- }
64
-
65
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
classes/class-link-related-table.php CHANGED
@@ -34,8 +34,6 @@ class RP4WP_Link_Related_Table extends WP_List_Table {
34
  /**
35
  * Add page views
36
  *
37
- * @param array $views
38
- *
39
  * @return array
40
  */
41
  public function add_page_views() {
@@ -119,11 +117,19 @@ class RP4WP_Link_Related_Table extends WP_List_Table {
119
  $sortable = $this->get_sortable_columns();
120
  $this->_column_headers = array( $columns, $hidden, $sortable );
121
 
 
 
 
 
 
 
 
 
122
  // Vies
123
  $this->views();
124
 
125
  // Set search
126
- if ( $this->search !== null ) {
127
  add_filter( 'posts_where', array( $this, 'filter_posts_where' ) );
128
  }
129
 
@@ -132,15 +138,33 @@ class RP4WP_Link_Related_Table extends WP_List_Table {
132
 
133
  // Get posts
134
  if ( 'all' == $view ) {
135
- $posts = get_posts( array(
 
 
 
 
 
136
  'post_type' => 'post',
137
- 'posts_per_page' => '-1',
138
- 'suppress_filters' => false
 
 
 
 
139
  ) );
 
 
 
 
 
 
 
 
 
140
  } else {
141
  $rpm = new RP4WP_Related_Post_Manager();
142
- $parent = $_GET['rp4wp_parent'];
143
- $posts = $rpm->get_related_posts( $parent );
144
  }
145
 
146
  // Format data for table
@@ -153,11 +177,12 @@ class RP4WP_Link_Related_Table extends WP_List_Table {
153
  // Remove search filter
154
  remove_filter( 'posts_where', array( $this, 'filter_posts_where' ) );
155
 
156
- // Sort
157
- if ( ! $this->is_related ) {
158
- if ( count( $this->data ) > 0 ) {
159
- usort( $this->data, array( $this, 'custom_reorder' ) );
160
- }
 
161
  }
162
 
163
  // Set items
34
  /**
35
  * Add page views
36
  *
 
 
37
  * @return array
38
  */
39
  public function add_page_views() {
117
  $sortable = $this->get_sortable_columns();
118
  $this->_column_headers = array( $columns, $hidden, $sortable );
119
 
120
+ // pagination and sorting
121
+ $screen = get_current_screen();
122
+ $per_page = absint( get_user_meta( get_current_user_id(), $screen->get_option( 'per_page', 'option' ), true ) );
123
+ $per_page = ( ( $per_page > 0 ) ? $per_page : 20 );
124
+ $paged = absint( isset( $_GET['paged'] ) ? $_GET['paged'] : 1 );
125
+ $orderby = isset( $_GET['orderby'] ) ? $_GET['orderby'] : 'title';
126
+ $order = isset( $_GET['order'] ) ? $_GET['order'] : 'asc';
127
+
128
  // Vies
129
  $this->views();
130
 
131
  // Set search
132
+ if ( null !== $this->search ) {
133
  add_filter( 'posts_where', array( $this, 'filter_posts_where' ) );
134
  }
135
 
138
 
139
  // Get posts
140
  if ( 'all' == $view ) {
141
+
142
+ // posts
143
+ $posts = array();
144
+
145
+ // the posts query
146
+ $post_query = new WP_Query( array(
147
  'post_type' => 'post',
148
+ 'posts_per_page' => $per_page,
149
+ 'paged' => $paged,
150
+ 'suppress_filters' => false,
151
+ 'orderby' => $orderby,
152
+ 'order' => $order,
153
+ 'post_status' => apply_filters( 'rp4wp_manual_link_post_statuses', array( 'publish', 'private' ) ),
154
  ) );
155
+
156
+ // Format data for table
157
+ if ( $post_query->have_posts() ) {
158
+ while ( $post_query->have_posts() ) {
159
+ $posts[] = $post_query->next_post();
160
+ }
161
+ }
162
+
163
+
164
  } else {
165
  $rpm = new RP4WP_Related_Post_Manager();
166
+ $parent = intval($_GET['rp4wp_parent']);
167
+ $posts = $rpm->get_related_posts( $parent, 25 );
168
  }
169
 
170
  // Format data for table
177
  // Remove search filter
178
  remove_filter( 'posts_where', array( $this, 'filter_posts_where' ) );
179
 
180
+ // Pagination only for all view
181
+ if ( 'all' == $view ) {
182
+ $this->set_pagination_args( array(
183
+ 'total_items' => $post_query->found_posts,
184
+ 'per_page' => $per_page
185
+ ) );
186
  }
187
 
188
  // Set items
classes/class-manager-filter.php CHANGED
@@ -8,45 +8,37 @@ if ( ! class_exists( 'RP4WP_Manager_Filter' ) ) {
8
 
9
  class RP4WP_Manager_Filter {
10
 
11
- private $filter_dir;
12
  private static $filters;
13
 
14
- public function __construct( $filter_dir ) {
15
- $this->filter_dir = $filter_dir;
 
 
 
16
  }
17
 
18
  /**
19
  * Load on specific filter instead of all filters.
20
  * This method should be used when the load_filters() isn't run yet, for example in the (de)activation process.
21
  *
22
- * @param $file_name
23
  */
24
- public function load_filter( $file_name ) {
25
- $class = RP4WP_Class_Manager::format_class_name( $file_name );
26
- if ( 'RP4WP_Filter' != $class ) {
27
- self::$filters[$class] = new $class;
28
- }
29
  }
30
 
31
  /**
32
  * Load and set hooks
33
  *
34
  * @access public
35
- * @static
36
  * @return void
37
  */
38
  public function load_filters() {
39
 
40
- foreach ( new DirectoryIterator( $this->filter_dir ) as $file ) {
41
-
42
- if ( ! $file->isDir() && ( strpos( $file->getFileName(), '.' ) !== 0 ) ) {
43
-
44
- $class = RP4WP_Class_Manager::format_class_name( $file->getFileName() );
45
- if ( 'RP4WP_Filter' != $class ) {
46
- self::$filters[$class] = new $class;
47
- }
48
-
49
- }
50
  }
51
 
52
  }
8
 
9
  class RP4WP_Manager_Filter {
10
 
11
+ private $filter_names;
12
  private static $filters;
13
 
14
+ /**
15
+ * @param array $filter_names
16
+ */
17
+ public function __construct( array $filter_names ) {
18
+ $this->filter_names = $filter_names;
19
  }
20
 
21
  /**
22
  * Load on specific filter instead of all filters.
23
  * This method should be used when the load_filters() isn't run yet, for example in the (de)activation process.
24
  *
25
+ * @param string $filter_name
26
  */
27
+ public function load_filter( $filter_name ) {
28
+ $class_name = "RP4WP_Filter_" . str_replace( ' ', '_', ucwords( str_replace( '_', ' ', $filter_name ) ) );
29
+ self::$filters[$class_name] = new $class_name;
 
 
30
  }
31
 
32
  /**
33
  * Load and set hooks
34
  *
35
  * @access public
 
36
  * @return void
37
  */
38
  public function load_filters() {
39
 
40
+ foreach( $this->filter_names as $filter_name ) {
41
+ $this->load_filter( $filter_name );
 
 
 
 
 
 
 
 
42
  }
43
 
44
  }
classes/class-manager-hook.php CHANGED
@@ -8,33 +8,34 @@ if ( ! class_exists( 'RP4WP_Manager_Hook' ) ) {
8
 
9
  class RP4WP_Manager_Hook {
10
 
11
- private $hook_dir;
12
  private static $hooks;
13
 
14
- public function __construct( $hook_dir ) {
15
- $this->hook_dir = $hook_dir;
 
 
 
 
 
 
 
 
 
 
 
16
  }
17
 
18
  /**
19
  * Load and set hooks
20
  *
21
  * @access public
22
- * @static
23
  * @return void
24
  */
25
  public function load_hooks() {
26
 
27
- foreach ( new DirectoryIterator( $this->hook_dir ) as $file ) {
28
-
29
- if ( ! $file->isDir() && ( strpos( $file->getFileName(), '.' ) !== 0 ) ) {
30
-
31
- $class = RP4WP_Class_Manager::format_class_name( $file->getFileName() );
32
- if ( 'RP4WP_Hook' != $class ) {
33
- self::$hooks[$class] = new $class;
34
- }
35
-
36
- }
37
-
38
  }
39
 
40
  }
8
 
9
  class RP4WP_Manager_Hook {
10
 
11
+ private $action_names = array();
12
  private static $hooks;
13
 
14
+ /**
15
+ * @param array $action_names
16
+ */
17
+ public function __construct( array $action_names ) {
18
+ $this->action_names = $action_names;
19
+ }
20
+
21
+ /**
22
+ * @param string $action_name
23
+ */
24
+ public function load_hook( $action_name ) {
25
+ $class_name = "RP4WP_Hook_" . str_replace( ' ', '_', ucwords( str_replace( '_', ' ', $action_name ) ) );
26
+ self::$hooks[$class_name] = new $class_name;
27
  }
28
 
29
  /**
30
  * Load and set hooks
31
  *
32
  * @access public
 
33
  * @return void
34
  */
35
  public function load_hooks() {
36
 
37
+ foreach( $this->action_names as $action_name ) {
38
+ $this->load_hook( $action_name );
 
 
 
 
 
 
 
 
 
39
  }
40
 
41
  }
classes/class-post-link-manager.php CHANGED
@@ -159,7 +159,7 @@ class RP4WP_Post_Link_Manager {
159
  *
160
  * @return array
161
  */
162
- public function get_children( $parent_id, $extra_args = null ) {
163
  global $post;
164
 
165
  // Store current post
@@ -188,6 +188,11 @@ class RP4WP_Post_Link_Manager {
188
  unset( $extra_args['order'] );
189
  }
190
 
 
 
 
 
 
191
  // Create link query
192
  $link_query = new WP_Query( $link_args );
193
 
@@ -199,7 +204,7 @@ class RP4WP_Post_Link_Manager {
199
  endwhile;
200
 
201
  // Get children with custom args
202
- if ( $extra_args !== null && count( $extra_args ) > 0 ) {
203
 
204
  if ( ! isset( $extra_args['orderby'] ) ) {
205
  $this->temp_child_order = array();
@@ -224,6 +229,11 @@ class RP4WP_Post_Link_Manager {
224
  // Extra arguments
225
  $child_args = array_merge_recursive( $child_args, $extra_args );
226
 
 
 
 
 
 
227
  // Child Query
228
  $child_query = new WP_Query( $child_args );
229
 
@@ -333,20 +343,21 @@ class RP4WP_Post_Link_Manager {
333
  /**
334
  * Generate the children list
335
  *
336
- * @param $id
 
337
  *
338
  * @since 1.0.0
339
  * @access public
340
  *
341
  * @return string
342
  */
343
- public function generate_children_list( $id ) {
344
 
345
  // The content
346
  $content = '';
347
 
348
  // Get the children
349
- $related_posts = $this->get_children( $id );
350
 
351
  // Count
352
  if ( count( $related_posts ) > 0 ) {
@@ -402,7 +413,7 @@ class RP4WP_Post_Link_Manager {
402
 
403
  $excerpt_length = RP4WP::get()->settings->get_option( 'excerpt_length' );
404
  if ( $excerpt_length > 0 ) {
405
- $excerpt = strip_shortcodes( ( ( '' != $rp4wp_post->post_excerpt ) ? $rp4wp_post->post_excerpt : wp_trim_words( $rp4wp_post->post_content, $excerpt_length ) ) );
406
  $content .= "<p>" . apply_filters( 'rp4wp_post_excerpt', $excerpt, $rp4wp_post->ID ) . "</p>";
407
  }
408
 
159
  *
160
  * @return array
161
  */
162
+ public function get_children( $parent_id, $extra_args = array() ) {
163
  global $post;
164
 
165
  // Store current post
188
  unset( $extra_args['order'] );
189
  }
190
 
191
+ /**
192
+ * Filter args for link query
193
+ */
194
+ $link_args = apply_filters( 'rp4wp_get_children_link_args', $link_args, $parent_id );
195
+
196
  // Create link query
197
  $link_query = new WP_Query( $link_args );
198
 
204
  endwhile;
205
 
206
  // Get children with custom args
207
+ if ( is_array( $extra_args ) && count( $extra_args ) > 0 ) {
208
 
209
  if ( ! isset( $extra_args['orderby'] ) ) {
210
  $this->temp_child_order = array();
229
  // Extra arguments
230
  $child_args = array_merge_recursive( $child_args, $extra_args );
231
 
232
+ /**
233
+ * Filter args for child query
234
+ */
235
+ $child_args = apply_filters( 'rp4wp_get_children_child_args', $child_args, $parent_id );
236
+
237
  // Child Query
238
  $child_query = new WP_Query( $child_args );
239
 
343
  /**
344
  * Generate the children list
345
  *
346
+ * @param int $id
347
+ * @param int $limit
348
  *
349
  * @since 1.0.0
350
  * @access public
351
  *
352
  * @return string
353
  */
354
+ public function generate_children_list( $id, $limit = -1 ) {
355
 
356
  // The content
357
  $content = '';
358
 
359
  // Get the children
360
+ $related_posts = $this->get_children( $id, array( 'posts_per_page' => $limit ) );
361
 
362
  // Count
363
  if ( count( $related_posts ) > 0 ) {
413
 
414
  $excerpt_length = RP4WP::get()->settings->get_option( 'excerpt_length' );
415
  if ( $excerpt_length > 0 ) {
416
+ $excerpt = wp_trim_words( strip_tags( strip_shortcodes( ( ( '' != $rp4wp_post->post_excerpt ) ? $rp4wp_post->post_excerpt : $rp4wp_post->post_content ) ) ), $excerpt_length );
417
  $content .= "<p>" . apply_filters( 'rp4wp_post_excerpt', $excerpt, $rp4wp_post->ID ) . "</p>";
418
  }
419
 
classes/class-related-post-manager.php CHANGED
@@ -9,7 +9,8 @@ class RP4WP_Related_Post_Manager {
9
  /**
10
  * Get related posts by post id and post type
11
  *
12
- * @param $post_id
 
13
  *
14
  * @return array
15
  */
@@ -70,14 +71,31 @@ class RP4WP_Related_Post_Manager {
70
  }
71
 
72
  /**
73
- * Get the uncached post count
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  *
75
  * @since 1.6.0
76
  * @access public
77
  *
78
  * @return mixed
79
  */
80
- public function get_uncached_post_count() {
81
  global $wpdb;
82
 
83
  $post_count = $wpdb->get_var( "SELECT COUNT(P.ID) FROM " . $wpdb->posts . " P LEFT JOIN ".$wpdb->postmeta." PM ON (P.ID = PM.post_id AND PM.meta_key = '" . RP4WP_Constants::PM_POST_AUTO_LINKED . "') WHERE 1=1 AND P.post_type = 'post' AND P.post_status = 'publish' AND PM.post_id IS NULL GROUP BY P.post_status" );
9
  /**
10
  * Get related posts by post id and post type
11
  *
12
+ * @param int $post_id
13
+ * @param int $limit
14
  *
15
  * @return array
16
  */
71
  }
72
 
73
  /**
74
+ * Deprecated, use get_unlinked_post_count() instead
75
+ *
76
+ * @deprecated 1.9.0
77
+ *
78
+ * @param $post_type
79
+ *
80
+ * @return mixed
81
+ */
82
+ public function get_uncached_post_count( $post_type ) {
83
+
84
+ // Deprecated notice
85
+ _deprecated_function( __FUNCTION__, '1.9.0', __CLASS__ . '->get_uncached_post_count()' );
86
+
87
+ return $this->get_unlinked_post_count( $post_type );
88
+ }
89
+
90
+ /**
91
+ * Get the unlinked post count
92
  *
93
  * @since 1.6.0
94
  * @access public
95
  *
96
  * @return mixed
97
  */
98
+ public function get_unlinked_post_count() {
99
  global $wpdb;
100
 
101
  $post_count = $wpdb->get_var( "SELECT COUNT(P.ID) FROM " . $wpdb->posts . " P LEFT JOIN ".$wpdb->postmeta." PM ON (P.ID = PM.post_id AND PM.meta_key = '" . RP4WP_Constants::PM_POST_AUTO_LINKED . "') WHERE 1=1 AND P.post_type = 'post' AND P.post_status = 'publish' AND PM.post_id IS NULL GROUP BY P.post_status" );
classes/class-related-word-manager.php CHANGED
@@ -25,7 +25,7 @@ class RP4WP_Related_Word_Manager {
25
  * Internal method that formats and outputs the $ignored_words array to screen
26
  */
27
  public function dedupe_and_order_ignored_words( $lang ) {
28
- $output = '$ignored_words = array(';
29
 
30
  $ignored_words = $this->get_ignored_words( $lang );
31
 
@@ -37,7 +37,7 @@ class RP4WP_Related_Word_Manager {
37
  if ( false !== strpos( $word, "Ã" ) ) {
38
  continue;
39
  }
40
- $temp_words[] = str_ireplace( "'", "", $word );
41
  }
42
 
43
  }
@@ -187,14 +187,13 @@ class RP4WP_Related_Word_Manager {
187
  */
188
  private function add_words_from_array( array $base_words, $words, $weight = 1 ) {
189
 
190
- if ( ! is_array( $words ) ) {
191
- return $base_words;
192
- }
193
-
194
- foreach ( $words as $word ) {
195
- $word = $this->convert_characters( $word );
196
- $word_multiplied_by_weight = array_fill( 0, $weight, $word );
197
- $base_words = array_merge( $base_words, $word_multiplied_by_weight );
198
  }
199
 
200
  return $base_words;
@@ -214,19 +213,9 @@ class RP4WP_Related_Word_Manager {
214
  $string = utf8_encode( $string );
215
  }
216
 
217
- // Check if iconv exists
218
- if ( function_exists( 'iconv' ) ) {
219
-
220
- // Replace all 'special characters' with normal ones
221
- $string = iconv( "UTF-8", "us-ascii//TRANSLIT", $string );
222
-
223
- } else {
224
-
225
- // iconv isn't installed, use a regex as alternative
226
- if ( strpos( $string = htmlentities( $string, ENT_QUOTES, 'UTF-8' ), '&' ) !== false ) {
227
- $string = html_entity_decode( preg_replace( '~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|tilde|uml);~i', '$1', $string ), ENT_QUOTES, 'UTF-8' );
228
- }
229
-
230
  }
231
 
232
 
25
  * Internal method that formats and outputs the $ignored_words array to screen
26
  */
27
  public function dedupe_and_order_ignored_words( $lang ) {
28
+ $output = 'return array(';
29
 
30
  $ignored_words = $this->get_ignored_words( $lang );
31
 
37
  if ( false !== strpos( $word, "Ã" ) ) {
38
  continue;
39
  }
40
+ $temp_words[] = trim( str_ireplace( "'", "", $word ) );
41
  }
42
 
43
  }
187
  */
188
  private function add_words_from_array( array $base_words, $words, $weight = 1 ) {
189
 
190
+ // Check if weight > 0 and if $words is array
191
+ if ( $weight > 0 && is_array( $words ) ) {
192
+ foreach ( $words as $word ) {
193
+ $word = $this->convert_characters( $word );
194
+ $word_multiplied_by_weight = array_fill( 0, $weight, $word );
195
+ $base_words = array_merge( $base_words, $word_multiplied_by_weight );
196
+ }
 
197
  }
198
 
199
  return $base_words;
213
  $string = utf8_encode( $string );
214
  }
215
 
216
+ // Replace all 'special characters' with normal ones
217
+ if ( strpos( $string = htmlentities( $string, ENT_QUOTES, 'UTF-8' ), '&' ) !== false ) {
218
+ $string = html_entity_decode( preg_replace( '~&([a-z]{1,2})(?:acute|cedil|circ|grave|lig|orn|ring|slash|tilde|uml);~i', '$1', $string ), ENT_QUOTES, 'UTF-8' );
 
 
 
 
 
 
 
 
 
 
219
  }
220
 
221
 
classes/class-rp4wp.php CHANGED
@@ -8,7 +8,7 @@ class RP4WP {
8
 
9
  private static $instance = null;
10
 
11
- const VERSION = '1.8.2';
12
 
13
  /**
14
  * @var RP4WP_Settings
@@ -42,15 +42,6 @@ class RP4WP {
42
  return RP4WP_PLUGIN_FILE;
43
  }
44
 
45
- /**
46
- * A static method that will setup the autoloader
47
- */
48
- private static function setup_autoloader() {
49
- require_once( plugin_dir_path( self::get_plugin_file() ) . '/classes/class-autoloader.php' );
50
- $autoloader = new RP4WP_Autoloader( plugin_dir_path( self::get_plugin_file() ) . 'classes/' );
51
- spl_autoload_register( array( $autoloader, 'load' ) );
52
- }
53
-
54
  /**
55
  * The constructor
56
  */
@@ -63,9 +54,6 @@ class RP4WP {
63
  */
64
  private function init() {
65
 
66
- // Setup the autoloader
67
- self::setup_autoloader();
68
-
69
  // Load plugin text domain
70
  load_plugin_textdomain( 'related-posts-for-wp', false, dirname( plugin_basename( RP4WP_PLUGIN_FILE ) ) . '/languages/' );
71
 
@@ -97,11 +85,13 @@ class RP4WP {
97
  add_action( 'init', array( $this, 'setup_settings' ) );
98
 
99
  // Filters
100
- $manager_filter = new RP4WP_Manager_Filter( plugin_dir_path( RP4WP_PLUGIN_FILE ) . 'classes/filters/' );
 
101
  $manager_filter->load_filters();
102
 
103
  // Hooks
104
- $manager_hook = new RP4WP_Manager_Hook( plugin_dir_path( RP4WP_PLUGIN_FILE ) . 'classes/hooks/' );
 
105
  $manager_hook->load_hooks();
106
 
107
  // Include template functions
@@ -127,14 +117,4 @@ class RP4WP {
127
  $this->settings = new RP4WP_Settings();
128
  }
129
 
130
- }
131
-
132
- /**
133
- * @since 1.0.0
134
- * @access public
135
- *
136
- * @return RP4WP
137
- */
138
- function RP4WP() {
139
- return RP4WP::get();
140
  }
8
 
9
  private static $instance = null;
10
 
11
+ const VERSION = '1.9.0';
12
 
13
  /**
14
  * @var RP4WP_Settings
42
  return RP4WP_PLUGIN_FILE;
43
  }
44
 
 
 
 
 
 
 
 
 
 
45
  /**
46
  * The constructor
47
  */
54
  */
55
  private function init() {
56
 
 
 
 
57
  // Load plugin text domain
58
  load_plugin_textdomain( 'related-posts-for-wp', false, dirname( plugin_basename( RP4WP_PLUGIN_FILE ) ) . '/languages/' );
59
 
85
  add_action( 'init', array( $this, 'setup_settings' ) );
86
 
87
  // Filters
88
+ $filters = include dirname( RP4WP_PLUGIN_FILE ) .'/includes/filters.php';
89
+ $manager_filter = new RP4WP_Manager_Filter( $filters );
90
  $manager_filter->load_filters();
91
 
92
  // Hooks
93
+ $actions = include dirname( RP4WP_PLUGIN_FILE ) .'/includes/actions.php';
94
+ $manager_hook = new RP4WP_Manager_Hook( $actions );
95
  $manager_hook->load_hooks();
96
 
97
  // Include template functions
117
  $this->settings = new RP4WP_Settings();
118
  }
119
 
 
 
 
 
 
 
 
 
 
 
120
  }
classes/filters/class-filter-set-screen-option.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ class RP4WP_Filter_Set_Screen_Option extends RP4WP_Filter {
8
+ protected $tag = 'set-screen-option';
9
+ protected $args = 3;
10
+
11
+ /**
12
+ * Save custom screen options
13
+ *
14
+ * @param $status
15
+ * @param $option
16
+ * @param $value
17
+ *
18
+ * @return string
19
+ */
20
+ public function run( $status, $option, $value ) {
21
+ if ( 'rp4wp_per_page' == $option ) {
22
+ return $value;
23
+ }
24
+
25
+ return $status;
26
+ }
27
+ }
classes/hooks/class-hook-ajax-install-link-posts.php CHANGED
@@ -25,10 +25,10 @@ class RP4WP_Hook_Ajax_Install_Link_Posts extends RP4WP_Hook {
25
  $related_post_manager->link_related_posts( $rel_amount, $ppr );
26
 
27
  // Get uncached post count
28
- $uncached_post_count = $related_post_manager->get_uncached_post_count();
29
 
30
  // Check if we're done
31
- if ( 0 == $uncached_post_count ) {
32
  // Save the wizard setting as the option
33
  $options = RP4WP()->settings->get_options();
34
  $options['automatic_linking_post_amount'] = $rel_amount;
@@ -36,7 +36,7 @@ class RP4WP_Hook_Ajax_Install_Link_Posts extends RP4WP_Hook {
36
  }
37
 
38
  // Echo the uncached posts
39
- echo $uncached_post_count;
40
 
41
  exit;
42
  }
25
  $related_post_manager->link_related_posts( $rel_amount, $ppr );
26
 
27
  // Get uncached post count
28
+ $unlinked_post_count = $related_post_manager->get_unlinked_post_count();
29
 
30
  // Check if we're done
31
+ if ( 0 == $unlinked_post_count ) {
32
  // Save the wizard setting as the option
33
  $options = RP4WP()->settings->get_options();
34
  $options['automatic_linking_post_amount'] = $rel_amount;
36
  }
37
 
38
  // Echo the uncached posts
39
+ echo $unlinked_post_count;
40
 
41
  exit;
42
  }
classes/hooks/class-hook-link-related-screen.php CHANGED
@@ -13,7 +13,21 @@ class RP4WP_Hook_Link_Related_Screen extends RP4WP_Hook {
13
  $this->handle_bulk_link();
14
 
15
  // Add Page
16
- add_submenu_page( null, 'Link_Related_Screen', 'Link_Related_Screen', 'edit_posts', 'rp4wp_link_related', array( $this, 'content' ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  }
18
 
19
  /**
13
  $this->handle_bulk_link();
14
 
15
  // Add Page
16
+ $screen_hook = add_submenu_page( null, 'Link_Related_Screen', 'Link_Related_Screen', 'edit_posts', 'rp4wp_link_related', array( $this, 'content' ) );
17
+
18
+ // add screen options
19
+ add_action( 'load-' . $screen_hook, array( $this, 'init_screen' ) );
20
+ }
21
+
22
+ /**
23
+ * Add screen options
24
+ */
25
+ public function init_screen() {
26
+ add_screen_option( 'per_page', array(
27
+ 'label' => 'Posts',
28
+ 'default' => 20,
29
+ 'option' => 'rp4wp_per_page'
30
+ ) );
31
  }
32
 
33
  /**
classes/hooks/class-hook-meta-box-ajax-sort.php CHANGED
@@ -4,7 +4,7 @@ if ( ! defined( 'ABSPATH' ) ) {
4
  exit;
5
  } // Exit if accessed directly
6
 
7
- class RP4WP_Hook_Meta_Box_AJAX_Sort extends RP4WP_Hook {
8
  protected $tag = 'wp_ajax_rp4wp_related_sort';
9
 
10
  public function run() {
4
  exit;
5
  } // Exit if accessed directly
6
 
7
+ class RP4WP_Hook_Meta_Box_Ajax_Sort extends RP4WP_Hook {
8
  protected $tag = 'wp_ajax_rp4wp_related_sort';
9
 
10
  public function run() {
classes/hooks/class-hook-page-install.php CHANGED
@@ -133,9 +133,13 @@ class RP4WP_Hook_Page_Install extends RP4WP_Hook {
133
 
134
  if ( 1 == $cur_step ) {
135
 
136
- // Echo current uncached posts
137
  $related_word_manager = new RP4WP_Related_Word_Manager();
138
- echo "<input type='hidden' id='rp4wp_uncached_posts' value='" . $related_word_manager->get_uncached_post_count() . "' />" . PHP_EOL;
 
 
 
 
139
 
140
  ?>
141
  <p><?php _e( 'Thank you for choosing Related Posts for WordPress!', 'related-posts-for-wp' ); ?></p>
@@ -144,13 +148,21 @@ class RP4WP_Hook_Page_Install extends RP4WP_Hook {
144
 
145
  <p style="font-weight: bold;"><?php _e( 'Do NOT close this window, wait for this process to finish and this wizard to take you to the next step.', 'related-posts-for-wp' ); ?></p>
146
 
147
- <div id="progressbar"></div>
 
 
 
 
148
  <?php
149
  } elseif ( 2 == $cur_step ) {
150
 
151
  // Echo current uncached posts
152
  $related_post_manager = new RP4WP_Related_Post_Manager();
153
- echo "<input type='hidden' id='rp4wp_uncached_posts' value='" . $related_post_manager->get_uncached_post_count() . "' />" . PHP_EOL;
 
 
 
 
154
 
155
  ?>
156
  <p style="font-weight: bold;"><?php _e( 'Great! All your posts were successfully cached!', 'related-posts-for-wp' ); ?></p>
@@ -169,7 +181,12 @@ class RP4WP_Hook_Page_Install extends RP4WP_Hook {
169
  class="button"><?php _e( 'Skip linking', 'related-posts-for-wp' ); ?></a>
170
  </p>
171
  <br class="clear"/>
172
- <div id="progressbar"></div>
 
 
 
 
 
173
  <?php
174
  } elseif ( 3 == $cur_step ) {
175
  ?>
133
 
134
  if ( 1 == $cur_step ) {
135
 
136
+ // related word manager
137
  $related_word_manager = new RP4WP_Related_Word_Manager();
138
+
139
+ // amount of posts needs caching
140
+ $posts_todo = $related_word_manager->get_uncached_post_count();
141
+
142
+ echo "<input type='hidden' id='rp4wp_posts_todo' value='" . $posts_todo . "' />" . PHP_EOL;
143
 
144
  ?>
145
  <p><?php _e( 'Thank you for choosing Related Posts for WordPress!', 'related-posts-for-wp' ); ?></p>
148
 
149
  <p style="font-weight: bold;"><?php _e( 'Do NOT close this window, wait for this process to finish and this wizard to take you to the next step.', 'related-posts-for-wp' ); ?></p>
150
 
151
+ <div id="progress-container">
152
+ <div id="progressbar"></div>
153
+ <p>Todo: <span id="progress-todo"><?php echo $posts_todo; ?></span></p>
154
+ <p>Done: <span id="progress-done">0</span></p>
155
+ </div>
156
  <?php
157
  } elseif ( 2 == $cur_step ) {
158
 
159
  // Echo current uncached posts
160
  $related_post_manager = new RP4WP_Related_Post_Manager();
161
+
162
+ // amount of posts need linking
163
+ $posts_todo = $related_post_manager->get_unlinked_post_count();
164
+
165
+ echo "<input type='hidden' id='rp4wp_posts_todo' value='" . $posts_todo . "' />" . PHP_EOL;
166
 
167
  ?>
168
  <p style="font-weight: bold;"><?php _e( 'Great! All your posts were successfully cached!', 'related-posts-for-wp' ); ?></p>
181
  class="button"><?php _e( 'Skip linking', 'related-posts-for-wp' ); ?></a>
182
  </p>
183
  <br class="clear"/>
184
+
185
+ <div id="progress-container">
186
+ <div id="progressbar"></div>
187
+ <p>Todo: <span id="progress-todo"><?php echo $posts_todo; ?></span></p>
188
+ <p>Done: <span id="progress-done">0</span></p>
189
+ </div>
190
  <?php
191
  } elseif ( 3 == $cur_step ) {
192
  ?>
classes/hooks/class-hook-settings-page.php CHANGED
@@ -42,62 +42,58 @@ class RP4WP_Hook_Settings_Page extends RP4WP_Hook {
42
  ?>
43
  <div class="rp4wp-sidebar">
44
 
45
- <div class="rp4wp-box">
46
- <div class="rp4wp-sidebar-header">
47
- <h3>Related Posts for WordPress</h3>
48
- </div>
49
-
50
- <p><?php _e( 'Plugin version', 'related-posts-for-wp' ); ?>: <?php echo RP4WP::VERSION; ?></p>
51
- <p><?php _e( 'Thank you for using Related Posts for WordPress!', 'related-posts-for-wp' ); ?></p>
52
- </div>
53
-
54
  <div class="rp4wp-box rp4wp-box-upgrade">
55
- <h3 class="rp4wp-title"><?php _e( 'Related Posts for WordPress Premium', 'related-posts-for-wp' ); ?></h3>
56
 
57
- <p><?php _e( "This plugin has an even better premium version, I am sure you will love it.", 'related-posts-for-wp' ); ?></p>
58
- <p><?php _e( "Premium features include cross custom post type related posts, related post themes, overwritable templates, adjustable weights, custom taxonomy support, priority support and more!", 'related-posts-for-wp' ); ?></p>
59
- <p><?php printf( __( "%sMore information about Related Posts for WP Premium »%s", 'related-posts-for-wp' ), '<a href="https://www.relatedpostsforwp.com/upgrade-premium/?utm_source=plugin&utm_medium=link&utm_campaign=upgrade-box" target="_blank">', '</a>' ); ?></p>
60
- </div>
61
 
62
- <div class="rp4wp-box">
63
- <h3 class="rp4wp-title"><?php _e( 'Show a token of your appreciation', 'related-posts-for-wp' ); ?></h3>
 
 
 
 
 
 
 
64
 
65
- <p><?php printf( __( "<a href='%s' target='_blank'>Leave a ★★★★★ plugin review on WordPress.org</a>", 'related-posts-for-wp' ), 'http://wordpress.org/support/view/plugin-reviews/related-posts-for-wp?rate=5#postform' ); ?></p>
66
- <p><?php printf( __( "<a href='%s' target='_blank'>Tweet about Related Posts for WordPress</a>", 'related-posts-for-wp' ), 'https://twitter.com/intent/tweet?text=Showing%20my%20appreciation%20to%20%40CageNL%20for%20his%20WordPress%20plugin%3A%20Related%20Posts%20for%20WordPress%20-%20check%20it%20out!%20http%3A%2F%2Fwordpress.org%2Fplugins%2Frelated-posts-for-wp%2F' ); ?></p>
67
- <p><?php printf( __( "Review the plugin on your blog and link to <a href='%s' target='_blank'>the plugin page</a>", 'related-posts-for-wp' ), 'https://www.relatedpostsforwp.com/?utm_source=plugin&utm_medium=link&utm_campaign=show-appreciation' ); ?></p>
68
- <p><?php printf( __( "<a href='%s' target='_blank'>Vote 'works' on the WordPress.org plugin page</a>", 'related-posts-for-wp' ), 'http://wordpress.org/plugins/related-posts-for-wp/' ); ?></p>
69
 
 
70
  </div>
71
 
72
  <div class="rp4wp-box">
73
- <h3 class="rp4wp-title"><?php _e( 'Looking for support?', 'related-posts-for-wp' ); ?></h3>
74
 
75
- <p><?php printf( __( "For support please visit the <a href='%s' target='_blank'>WordPress.org forums</a>.", 'related-posts-for-wp' ), 'http://wordpress.org/support/plugin/related-posts-for-wp' ); ?></p>
 
 
76
 
77
- <p style="color: green;font-weight: bold;"><?php printf( __( "Did you know that Related Posts for WordPress Premium clients get priority email support? %sClick here to upgrade.%s", 'related-posts-for-wp' ), '<a href="https://www.relatedpostsforwp.com/upgrade-premium/?utm_source=plugin&utm_medium=link&utm_campaign=support" target="_blank">', '</a>' ); ?></p>
78
  </div>
79
 
80
  <div class="rp4wp-box">
81
- <h3 class="rp4wp-title"><?php _e( 'More information', 'related-posts-for-wp' ); ?></h3>
 
 
82
 
83
- <p><?php printf( __( "<a href='%s' target='_blank'>Documentation</a>", 'related-posts-for-wp' ), 'https://www.relatedpostsforwp.com/documentation/?utm_source=plugin&utm_medium=link&utm_campaign=more-information-documentation' ); ?></p>
84
 
85
- <p><?php printf( __( "<a href='%s' target='_blank'>FAQ</a>", 'related-posts-for-wp' ), 'https://wordpress.org/plugins/related-posts-for-wp/faq/' ); ?></p>
86
 
87
- <p><?php printf( __( "<a href='%s' target='_blank'>Changelog</a>", 'related-posts-for-wp' ), 'https://wordpress.org/plugins/related-posts-for-wp/changelog/' ); ?></p>
88
 
89
- <p><?php printf( __( "<a href='%s' target='_blank'>Website</a>", 'related-posts-for-wp' ), 'https://www.relatedpostsforwp.com/?utm_source=plugin&utm_medium=link&utm_campaign=more-information-website' ); ?></p>
90
 
91
  </div>
92
 
93
  <div class="rp4wp-box">
94
  <h3 class="rp4wp-title"><?php _e( 'About the developer', 'related-posts-for-wp' ); ?></h3>
95
 
96
- <p><?php _e( "Barry is a WordPress developer that works on WooCommerce and is the author of various WordPress plugins that include Related Posts for WordPress, Post Connector and What The File.", 'related-posts-for-wp' ); ?></p>
97
 
98
- <p><?php _e( "Barry likes contributing to opensource projects and visiting WordCamps and WordPress meetups. He’s the organizer of the WordPress meetup in Tilburg.", 'related-posts-for-wp' ); ?></p>
99
 
100
- <p><?php printf( __( "<a href='%s' target='_blank'>Follow Barry on Twitter</a>", 'related-posts-for-wp' ), 'https://twitter.com/cageNL' ); ?></p>
101
  </div>
102
 
103
  </div>
@@ -111,15 +107,62 @@ class RP4WP_Hook_Settings_Page extends RP4WP_Hook {
111
  * @access public
112
  */
113
  public function screen() {
 
114
  ?>
115
  <div class="wrap">
116
  <h2>Related Posts for WordPress</h2>
117
 
118
  <div class="rp4wp-content">
119
  <form method="post" action="options.php" id="rp4wp-settings-form">
120
- <?php settings_fields( 'rp4wp' ); //pass slug name of page, also referred
121
- //to in Settings API as option group name
122
- do_settings_sections( 'rp4wp' ); //pass slug name of page
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  submit_button();
124
  ?>
125
  </form>
42
  ?>
43
  <div class="rp4wp-sidebar">
44
 
 
 
 
 
 
 
 
 
 
45
  <div class="rp4wp-box rp4wp-box-upgrade">
46
+ <h3><?php _e( 'Related Posts for WordPress Premium', 'related-posts-for-wp' ); ?></h3>
47
 
48
+ <p><?php _e( 'This plugin has an even better premium version, I am sure you will love it.', 'related-posts-for-wp' ); ?></p>
 
 
 
49
 
50
+ <p><?php _e( 'Premium features include:', 'related-posts-for-wp' ); ?></p>
51
+ <ul>
52
+ <li><?php _e( 'Full control over your post display with our configurator', 'related-posts-for-wp' ); ?></li>
53
+ <li><?php _e( 'Related Custom Post Types & Taxonomies to each other', 'related-posts-for-wp' ); ?></li>
54
+ <li><?php _e( 'Ability to Exclude posts from being related', 'related-posts-for-wp' ); ?></li>
55
+ <li><?php _e( 'Keep Manually created links', 'related-posts-for-wp' ); ?></li>
56
+ <li><?php _e( 'Define What you find related by setting weights', 'related-posts-for-wp' ); ?></li>
57
+ <li><?php _e( 'Top notch priority Email support', 'related-posts-for-wp' ); ?></li>
58
+ </ul>
59
 
60
+ <p><?php _e( 'And more features, click the button below to get a full overview including a demo video!', 'related-posts-for-wp' ); ?></p>
 
 
 
61
 
62
+ <p><?php printf( __( '%sView All Premium Features%s', 'related-posts-for-wp' ), '<a class="button button-primary button-large" href="https://www.relatedpostsforwp.com/upgrade-premium/?utm_source=plugin&utm_medium=link&utm_campaign=upgrade-box" target="_blank">', '</a>' ); ?></p>
63
  </div>
64
 
65
  <div class="rp4wp-box">
66
+ <h3 class="rp4wp-title"><?php _e( 'Can we help you?', 'related-posts-for-wp' ); ?></h3>
67
 
68
+ <p><?php printf( __( "We've covered a lot of general questions in our %sdocumentation%s, is your question not covered there? Feel free to open a thread at our %sWordPress.org forum%s.", 'related-posts-for-wp' ), '<a href="https://www.relatedpostsforwp.com/documentation/" target="_blank">', '</a>', '<a href="http://wordpress.org/support/plugin/related-posts-for-wp" target="_blank">', '</a>' ); ?></p>
69
+
70
+ <p><?php printf( __( "Did you know our %sPremium customers%s get priority email support?", 'related-posts-for-wp' ), '<a href="https://www.relatedpostsforwp.com/upgrade-premium/?utm_source=plugin&utm_medium=link&utm_campaign=support" target="_blank">', '</a>' ); ?></p>
71
 
 
72
  </div>
73
 
74
  <div class="rp4wp-box">
75
+ <h3 class="rp4wp-title"><?php _e( 'Want to help us?', 'related-posts-for-wp' ); ?></h3>
76
+
77
+ <p><?php printf( __( "%sUpgrade to Related Posts for WordPress Premium%s", 'related-posts-for-wp' ), '<a href="https://www.relatedpostsforwp.com/upgrade-premium/?utm_source=plugin&utm_medium=link&utm_campaign=help-us" target="_blank">', '</a>' ); ?></p>
78
 
79
+ <p><?php printf( __( "%sLeave a ★★★★★ plugin review on WordPress.org%s", 'related-posts-for-wp' ), '<a href="http://wordpress.org/support/view/plugin-reviews/related-posts-for-wp?rate=5#postform" target="_blank">', '</a>' ); ?></p>
80
 
81
+ <p><?php printf( __( "%sTweet about Related Posts for WordPress%s", 'related-posts-for-wp' ), '<a href="https://twitter.com/intent/tweet?text=Showing%20my%20appreciation%20to%20%40CageNL%20for%20his%20WordPress%20plugin%3A%20Related%20Posts%20for%20WordPress%20-%20check%20it%20out!%20http%3A%2F%2Fwordpress.org%2Fplugins%2Frelated-posts-for-wp%2F" target="_blank">', '</a>' ); ?></p>
82
 
83
+ <p><?php printf( __( "Review the plugin on your blog and link to %sthe plugin page%s", 'related-posts-for-wp' ), '<a href="https://www.relatedpostsforwp.com/?utm_source=plugin&utm_medium=link&utm_campaign=help-us" target="_blank">', '</a>' ); ?></p>
84
 
85
+ <p><?php printf( __( "%sVote 'works' on the WordPress.org plugin page%s", 'related-posts-for-wp' ), '<a href="http://wordpress.org/plugins/related-posts-for-wp/" target="_blank">', '</a>' ); ?></p>
86
 
87
  </div>
88
 
89
  <div class="rp4wp-box">
90
  <h3 class="rp4wp-title"><?php _e( 'About the developer', 'related-posts-for-wp' ); ?></h3>
91
 
92
+ <p><?php _e( "Barry is a WordPress developer and the author of various WordPress plugins that include Related Posts for WordPress, Download Monitor, Post Connector and What The File.", 'related-posts-for-wp' ); ?></p>
93
 
94
+ <p><?php _e( "Barry likes contributing to open source projects and visiting WordCamps and meetups. He’s the organizer of the WordPress meetup in Tilburg and in the organizing team for WordCamp The Netherlands.", 'related-posts-for-wp' ); ?></p>
95
 
96
+ <p><?php printf( __( "%sFollow Barry on Twitter%s", 'related-posts-for-wp' ), '<a href="https://twitter.com/cageNL" target="_blank">', '</a>' ); ?></p>
97
  </div>
98
 
99
  </div>
107
  * @access public
108
  */
109
  public function screen() {
110
+ global $wp_settings_sections, $wp_settings_fields;
111
  ?>
112
  <div class="wrap">
113
  <h2>Related Posts for WordPress</h2>
114
 
115
  <div class="rp4wp-content">
116
  <form method="post" action="options.php" id="rp4wp-settings-form">
117
+ <?php
118
+ //pass slug name of page, also referred to in Settings API as option group name
119
+ settings_fields( 'rp4wp' );
120
+
121
+ //do_settings_sections( 'rp4wp' ); //pass slug name of page
122
+
123
+ if ( isset( $wp_settings_sections['rp4wp'] ) ) {
124
+
125
+ echo '<h2 class="nav-tab-wrapper">';
126
+ foreach ( (array) $wp_settings_sections['rp4wp'] as $section ) {
127
+ //nav-tab-active
128
+ echo '<a href="#rp4wp-settings-' . $section['id'] . '" class="nav-tab">' . $section['title'] . '</a>';
129
+ }
130
+ echo '</h2>' . PHP_EOL;
131
+ ?>
132
+ <?php
133
+
134
+
135
+ foreach ( (array) $wp_settings_sections['rp4wp'] as $section ) {
136
+
137
+ echo '<div id="rp4wp-settings-' . $section['id'] . '" class="rp4wp-settings-section">';
138
+
139
+ if ( $section['title'] ) {
140
+ echo "<h3>{$section['title']}</h3>\n";
141
+ }
142
+
143
+ if ( $section['callback'] ) {
144
+ call_user_func( $section['callback'], $section );
145
+ }
146
+
147
+ if ( isset( $wp_settings_fields ) && isset( $wp_settings_fields['rp4wp'] ) && isset( $wp_settings_fields['rp4wp'][ $section['id'] ] ) ) {
148
+ echo '<table class="form-table">';
149
+ do_settings_fields( 'rp4wp', $section['id'] );
150
+ echo '</table>';
151
+
152
+ }
153
+
154
+ echo '</div>';
155
+ }
156
+
157
+
158
+ }
159
+
160
+ // echo '<pre>';
161
+ // print_r( $wp_settings_sections['rp4wp'] );
162
+ // echo '</pre>';
163
+
164
+
165
+ // submit button
166
  submit_button();
167
  ?>
168
  </form>
classes/hooks/class-hook-shortcode.php CHANGED
@@ -18,14 +18,17 @@ class RP4WP_Hook_Shortcode extends RP4WP_Hook {
18
  * @access public
19
  *
20
  */
21
- public function output() {
22
- // Get the current ID
23
- $id = get_the_ID();
 
 
 
24
 
25
  // Post Link Manager
26
  $pl_manager = new RP4WP_Post_Link_Manager();
27
 
28
  // Generate the children list
29
- return $pl_manager->generate_children_list( $id );
30
  }
31
  }
18
  * @access public
19
  *
20
  */
21
+ public function output( $atts ) {
22
+
23
+ $atts = shortcode_atts( array(
24
+ 'id' => get_the_ID(),
25
+ 'limit' => -1
26
+ ), $atts );
27
 
28
  // Post Link Manager
29
  $pl_manager = new RP4WP_Post_Link_Manager();
30
 
31
  // Generate the children list
32
+ return $pl_manager->generate_children_list( $atts['id'], $atts['limit'] );
33
  }
34
  }
classes/ignored-words/bg_BG.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ return array( 'а', 'автентичен', 'аз', 'ако', 'ала', 'бе', 'без', 'беше', 'би', 'бивш', 'бивша', 'бившо', 'бил', 'била', 'били', 'било', 'благодаря', 'близо', 'бъдат', 'бъде', 'бяха', 'в', 'вас', 'ваш', 'ваша', 'вероятно', 'вече', 'взема', 'ви', 'вие', 'винаги', 'внимава', 'време', 'все', 'всеки', 'всички', 'всичко', 'всяка', 'във', 'въпреки', 'върху', 'г', 'ги', 'главен', 'главна', 'главно', 'глас', 'го', 'година', 'години', 'годишен', 'д', 'да', 'дали', 'два', 'двама', 'двамата', 'две', 'двете', 'ден', 'днес', 'дни', 'до', 'добра', 'добре', 'добро', 'добър', 'докато', 'докога', 'дори', 'досега', 'доста', 'друг', 'друга', 'други', 'е', 'евтин', 'едва', 'един', 'една', 'еднаква', 'еднакви', 'еднакъв', 'едно', 'екип', 'ето', 'живот', 'за', 'забавям', 'зад', 'заедно', 'заради', 'засега', 'заспал', 'затова', 'защо', 'защото', 'и', 'из', 'или', 'им', 'има', 'имат', 'иска', 'й', 'каза', 'как', 'каква', 'какво', 'както', 'какъв', 'като', 'кога', 'когато', 'което', 'които', 'кой', 'който', 'колко', 'която', 'къде', 'където', 'към', 'лесен', 'лесно', 'ли', 'лош', 'м', 'май', 'малко', 'ме', 'между', 'мек', 'мен', 'месец', 'ми', 'много', 'мнозина', 'мога', 'могат', 'може', 'мокър', 'моля', 'момента', 'му', 'н', 'на', 'над', 'назад', 'най', 'направи', 'напред', 'например', 'нас', 'не', 'него', 'нещо', 'нея', 'ни', 'ние', 'никой', 'нито', 'нищо', 'но', 'нов', 'нова', 'нови', 'новина', 'някои', 'някой', 'няколко', 'няма', 'обаче', 'около', 'освен', 'особено', 'от', 'отгоре', 'отново', 'още', 'пак', 'по', 'повече', 'повечето', 'под', 'поне', 'поради', 'после', 'почти', 'прави', 'пред', 'преди', 'през', 'при', 'пък', 'първата', 'първи', 'първо', 'пъти', 'равен', 'равна', 'с', 'са', 'сам', 'само', 'се', 'сега', 'си', 'син', 'скоро', 'след', 'следващ', 'сме', 'смях', 'според', 'сред', 'срещу', 'сте', 'съм', 'със', 'също', 'т', 'тази', 'така', 'такива', 'такъв', 'там', 'твой', 'те', 'тези', 'ти', 'то', 'това', 'тогава', 'този', 'той', 'толкова', 'точно', 'три', 'трябва', 'тук', 'тъй', 'тя', 'тях', 'т.н.', 'у', 'утре', 'харесва', 'хиляди', 'ч', 'часа', 'че', 'често', 'чрез', 'ще', 'щом', 'юмрук', 'я', 'як',);
classes/ignored-words/cs_CZ.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ return array( '', 'a', 'aby', 'aj', 'ale', 'anebo', 'ani', 'ano', 'asi', 'ba', 'bez', 'bude', 'budem', 'by', 'byl', 'byla', 'byli', 'bylo', 'co', 'com', 'cz', 'design', 'dnes', 'do', 'email', 'ho', 'i', 'jak', 'je', 'jeho', 'jej', 'jejich', 'jen', 'ji', 'jsem', 'jsi', 'jsme', 'jsou', 'jste', 'k', 'kam', 'kde', 'kdo', 'ke', 'kterou', 'ku', 'mezi', 'mi', 'mne', 'mnou', 'my', 'na', 'nad', 'ne', 'nebo', 'nejsou', 'net', 'ni', 'nic', 'o', 'od', 'ode', 'on', 'org', 'pak', 'po', 'pod', 'podle', 'pokud', 'pouze', 'pro', 'proto', 're', 's', 'se', 'si', 'sice', 'spol', 'strana', 'ta', 'tak', 'tamhle', 'tato', 'tedy', 'ten', 'tento', 'tipy', 'to', 'tohle', 'toho', 'tohoto', 'tom', 'tomto', 'tomuto', 'tu', 'tuto', 'ty', 'tyto', 'u', 'v', 've', 'vedle', 'vy', 'z', 'za', 'zda', 'zde',);
classes/ignored-words/es_ES.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ return array( 'a', 'actualmente', 'adelante', 'además', 'afirmó', 'agregó', 'ahora', 'ahí', 'al', 'algo', 'alguna', 'algunas', 'alguno', 'algunos', 'algún', 'alrededor', 'ambos', 'ante', 'anterior', 'antes', 'apenas', 'aproximadamente', 'aquí', 'aseguró', 'así', 'aunque', 'ayer', 'añadió', 'aún', 'bajo', 'bien', 'buen', 'buena', 'buenas', 'bueno', 'buenos', 'cada', 'casi', 'cerca', 'cierto', 'cinco', 'comentó', 'como', 'con', 'conocer', 'considera', 'consideró', 'contra', 'cosas', 'creo', 'cual', 'cuales', 'cualquier', 'cuando', 'cuanto', 'cuatro', 'cuenta', 'cómo', 'da', 'dado', 'dan', 'dar', 'de', 'debe', 'deben', 'debido', 'decir', 'dejó', 'del', 'demás', 'dentro', 'desde', 'después', 'dice', 'dicen', 'dicho', 'dieron', 'diferente', 'diferentes', 'dijeron', 'dijo', 'dio', 'donde', 'dos', 'durante', 'e', 'ejemplo', 'el', 'ella', 'ellas', 'ello', 'ellos', 'embargo', 'en', 'encuentra', 'entonces', 'entre', 'era', 'eran', 'es', 'esa', 'esas', 'ese', 'eso', 'esos', 'esta', 'estaba', 'estaban', 'estamos', 'estar', 'estará', 'estas', 'este', 'esto', 'estos', 'estoy', 'estuvo', 'está', 'están', 'ex', 'existe', 'existen', 'explicó', 'expresó', 'fin', 'fue', 'fuera', 'fueron', 'gran', 'grandes', 'ha', 'haber', 'habrá', 'había', 'habían', 'hace', 'hacen', 'hacer', 'hacerlo', 'hacia', 'haciendo', 'han', 'hasta', 'hay', 'haya', 'he', 'hecho', 'hemos', 'hicieron', 'hizo', 'hoy', 'hubo', 'igual', 'incluso', 'indicó', 'informó', 'junto', 'la', 'lado', 'las', 'le', 'les', 'llegó', 'lleva', 'llevar', 'lo', 'los', 'luego', 'lugar', 'manera', 'manifestó', 'mayor', 'me', 'mediante', 'mejor', 'mencionó', 'menos', 'mi', 'mientras', 'misma', 'mismas', 'mismo', 'mismos', 'momento', 'mucha', 'muchas', 'mucho', 'muchos', 'muy', 'más', 'nada', 'nadie', 'ni', 'ninguna', 'ningunas', 'ninguno', 'ningunos', 'ningún', 'no', 'nos', 'nosotras', 'nosotros', 'nuestra', 'nuestras', 'nuestro', 'nuestros', 'nueva', 'nuevas', 'nuevo', 'nuevos', 'nunca', 'o', 'ocho', 'otra', 'otras', 'otro', 'otros', 'para', 'parece', 'parte', 'partir', 'pasada', 'pasado', 'pero', 'pesar', 'poca', 'pocas', 'poco', 'pocos', 'podemos', 'podrá', 'podrán', 'podría', 'podrían', 'poner', 'por', 'porque', 'posible', 'primer', 'primera', 'primero', 'primeros', 'principalmente', 'propia', 'propias', 'propio', 'propios', 'próximo', 'próximos', 'pudo', 'pueda', 'puede', 'pueden', 'pues', 'que', 'quedó', 'queremos', 'quien', 'quienes', 'quiere', 'quién', 'qué', 'realizado', 'realizar', 'realizó', 'respecto', 'se', 'sea', 'sean', 'segunda', 'segundo', 'según', 'seis', 'ser', 'será', 'serán', 'sería', 'señaló', 'si', 'sido', 'siempre', 'siendo', 'siete', 'sigue', 'siguiente', 'sin', 'sino', 'sobre', 'sola', 'solamente', 'solas', 'solo', 'solos', 'son', 'su', 'sus', 'sí', 'sólo', 'tal', 'también', 'tampoco', 'tan', 'tanto', 'tendrá', 'tendrán', 'tenemos', 'tener', 'tenga', 'tengo', 'tenido', 'tenía', 'tercera', 'tiene', 'tienen', 'toda', 'todas', 'todavía', 'todo', 'todos', 'total', 'tras', 'trata', 'través', 'tres', 'tuvo', 'un', 'una', 'unas', 'uno', 'unos', 'usted', 'va', 'vamos', 'van', 'varias', 'varios', 'veces', 'ver', 'vez', 'y', 'ya', 'yo', 'él', 'ésta', 'éstas', 'éste', 'éstos', 'última', 'últimas', 'último', 'últimos',);
classes/ignored-words/nb_NO.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ return array( 'alle', 'andre', 'arbeid', 'av', 'begge', 'bort', 'bra', 'bruke', 'da', 'denne', 'der', 'deres', 'det', 'din', 'disse', 'du', 'eller', 'en', 'ene', 'eneste', 'enhver', 'enn', 'er', 'et', 'folk', 'for', 'fordi', 'forsÛke', 'fra', 'fÅ', 'fÛr', 'fÛrst', 'gjorde', 'gjÛre', 'god', 'gÅ', 'ha', 'hadde', 'han', 'hans', 'hennes', 'her', 'hva', 'hvem', 'hver', 'hvilken', 'hvis', 'hvor', 'hvordan', 'hvorfor', 'i', 'ikke', 'inn', 'innen', 'kan', 'kunne', 'lage', 'lang', 'lik', 'like', 'makt', 'mange', 'med', 'meg', 'meget', 'men', 'mens', 'mer', 'mest', 'min', 'mye', 'mÅ', 'mÅte', 'navn', 'nei', 'ny', 'nÅ', 'nÅr', 'og', 'ogsÅ', 'om', 'opp', 'oss', 'over', 'part', 'punkt', 'pÅ', 'rett', 'riktig', 'samme', 'sant', 'si', 'siden', 'sist', 'skulle', 'slik', 'slutt', 'som', 'start', 'stille', 'sÅ', 'tid', 'til', 'tilbake', 'tilstand', 'under', 'ut', 'uten', 'var', 'ved', 'verdi', 'vi', 'vil', 'ville', 'vite', 'vÅr', 'vÖre', 'vÖrt', 'Å',);
classes/ignored-words/pt_BR.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ return array( 'a', 'acerca', 'agora', 'ainda', 'algum', 'alguma', 'algumas', 'alguns', 'ali', 'ambos', 'ampla', 'amplas', 'amplo', 'amplos', 'ante', 'antes', 'ao', 'aos', 'apontar', 'aquela', 'aquelas', 'aquele', 'aqueles', 'aqui', 'aquilo', 'as', 'bem', 'bom', 'cada', 'caminho', 'cima', 'coisa', 'coisas', 'com', 'como', 'conhecido', 'contra', 'contudo', 'corrente', 'da', 'daquela', 'daquelas', 'daquele', 'daqueles', 'das', 'de', 'debaixo', 'dela', 'delas', 'dele', 'deles', 'dentro', 'depois', 'desde', 'desligado', 'dessa', 'dessas', 'desse', 'desses', 'desta', 'destas', 'deste', 'destes', 'deve', 'devem', 'devendo', 'dever', 'deveria', 'deveriam', 'devia', 'deviam', 'direita', 'disse', 'disso', 'disto', 'dito', 'diz', 'dizem', 'do', 'dois', 'dos', 'e', 'ela', 'elas', 'ele', 'eles', 'em', 'enquanto', 'entre', 'era', 'essa', 'essas', 'esse', 'esses', 'esta', 'estamos', 'estar', 'estas', 'estava', 'estavam', 'este', 'estes', 'estou', 'eu', 'faz', 'fazendo', 'fazer', 'fazia', 'feita', 'feitas', 'feito', 'feitos', 'fez', 'fim', 'foi', 'for', 'fora', 'foram', 'fosse', 'fossem', 'grande', 'grandes', 'hora', 'horas', 'iniciar', 'ir', 'isso', 'isto', 'ligado', 'maioria', 'maiorias', 'mais', 'mas', 'me', 'mesma', 'mesmas', 'mesmo', 'mesmos', 'meu', 'meus', 'minha', 'minhas', 'muita', 'muitas', 'muito', 'muitos', 'na', 'nas', 'nem', 'nenhum', 'nessa', 'nessas', 'nesta', 'nestas', 'no', 'nome', 'nos', 'nossa', 'nossas', 'nosso', 'nossos', 'novo', 'num', 'numa', 'nunca', 'o', 'onde', 'os', 'ou', 'outra', 'outras', 'outro', 'outros', 'para', 'parte', 'pegar', 'pela', 'pelas', 'pelo', 'pelos', 'pequena', 'pequenas', 'pequeno', 'pequenos', 'perante', 'pessoa', 'pessoas', 'pode', 'podendo', 'poder', 'poderia', 'poderiam', 'podia', 'podiam', 'pois', 'por', 'porque', 'posso', 'pouca', 'poucas', 'pouco', 'poucos', 'povo', 'primeiro', 'primeiros', 'quais', 'qual', 'qualquer', 'quando', 'quanto', 'quantos', 'que', 'quem', 'saber', 'se', 'seja', 'sejam', 'sem', 'sempre', 'sendo', 'ser', 'seu', 'seus', 'si', 'sido', 'sob', 'sobre', 'somente', 'sua', 'suas', 'tal', 'talvez', 'tampouco', 'te', 'tem', 'tempo', 'tendo', 'tenha', 'tenho', 'tentaram', 'tentarem', 'ter', 'teu', 'teus', 'teve', 'ti', 'tido', 'tinha', 'tinham', 'tipo', 'tive', 'toda', 'todas', 'todavia', 'todo', 'todos', 'tu', 'tua', 'tuas', 'tudo', 'um', 'uma', 'umas', 'uns', 'usa', 'usar', 'veja', 'vendo', 'ver', 'verdade', 'verdadeiro', 'vez', 'vindo', 'vir',);
classes/ignored-words/ru_RU.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ return array( '', 'а', 'алло', 'без', 'близко', 'более', 'больше', 'будем', 'будет', 'будете', 'будешь', 'будто', 'буду', 'будут', 'будь', 'бы', 'бывает', 'бывь', 'был', 'была', 'были', 'было', 'быть', 'в', 'важная', 'важное', 'важные', 'важный', 'вам', 'вами', 'вас', 'ваш', 'ваша', 'ваше', 'ваши', 'вверх', 'вдали', 'вдруг', 'ведь', 'везде', 'весь', 'вниз', 'внизу', 'во', 'вокруг', 'вон', 'восемнадцатый', 'восемнадцать', 'восемь', 'восьмой', 'вот', 'впрочем', 'времени', 'время', 'все', 'всегда', 'всего', 'всем', 'всеми', 'всему', 'всех', 'всею', 'всю', 'всюду', 'вся', 'всё', 'второй', 'вы', 'г', 'где', 'говорил', 'говорит', 'год', 'года', 'году', 'да', 'давно', 'даже', 'далеко', 'дальше', 'даром', 'два', 'двадцатый', 'двадцать', 'две', 'двенадцатый', 'двенадцать', 'двух', 'девятнадцатый', 'девятнадцать', 'девятый', 'девять', 'действительно', 'дел', 'день', 'десятый', 'десять', 'для', 'до', 'довольно', 'долго', 'должно', 'другая', 'другие', 'других', 'друго', 'другое', 'другой', 'е', 'его', 'ее', 'ей', 'ему', 'если', 'есть', 'еще', 'ещё', 'ею', 'её', 'ж', 'же', 'жизнь', 'за', 'занят', 'занята', 'занято', 'заняты', 'затем', 'зато', 'зачем', 'здесь', 'значит', 'и', 'из', 'или', 'им', 'именно', 'иметь', 'ими', 'имя', 'иногда', 'их', 'к', 'каждая', 'каждое', 'каждые', 'каждый', 'кажется', 'как', 'какая', 'какой', 'кем', 'когда', 'кого', 'ком', 'кому', 'конечно', 'которая', 'которого', 'которой', 'которые', 'который', 'которых', 'кроме', 'кругом', 'кто', 'куда', 'лет', 'ли', 'лишь', 'лучше', 'люди', 'м', 'мало', 'между', 'меля', 'менее', 'меньше', 'меня', 'миллионов', 'мимо', 'мира', 'мне', 'много', 'многочисленная', 'многочисленное', 'многочисленные', 'многочисленный', 'мной', 'мною', 'мог', 'могут', 'мож', 'может', 'можно', 'можхо', 'мои', 'мой', 'мор', 'мочь', 'моя', 'моё', 'мы', 'на', 'наверху', 'над', 'надо', 'назад', 'наиболее', 'наконец', 'нам', 'нами', 'нас', 'начала', 'наш', 'наша', 'наше', 'наши', 'не', 'него', 'недавно', 'недалеко', 'нее', 'ней', 'нельзя', 'нем', 'немного', 'нему', 'непрерывно', 'нередко', 'несколько', 'нет', 'нею', 'неё', 'ни', 'нибудь', 'ниже', 'низко', 'никогда', 'никуда', 'ними', 'них', 'ничего', 'но', 'ну', 'нужно', 'нх', 'о', 'об', 'оба', 'обычно', 'один', 'одиннадцатый', 'одиннадцать', 'однажды', 'однако', 'одного', 'одной', 'около', 'он', 'она', 'они', 'оно', 'опять', 'особенно', 'от', 'отовсюду', 'отсюда', 'очень', 'первый', 'перед', 'по', 'под', 'пожалуйста', 'позже', 'пока', 'пор', 'пора', 'после', 'посреди', 'потом', 'потому', 'почему', 'почти', 'прекрасно', 'при', 'про', 'просто', 'против', 'процентов', 'пятнадцатый', 'пятнадцать', 'пятый', 'пять', 'раз', 'разве', 'рано', 'раньше', 'рядом', 'с', 'сам', 'сама', 'сами', 'самим', 'самими', 'самих', 'само', 'самого', 'самой', 'самом', 'самому', 'саму', 'свое', 'своего', 'своей', 'свои', 'своих', 'свою', 'сеаой', 'себе', 'себя', 'сегодня', 'седьмой', 'сейчас', 'семнадцатый', 'семнадцать', 'семь', 'сих', 'сказал', 'сказала', 'сказать', 'сколько', 'слишком', 'сначала', 'снова', 'со', 'собой', 'собою', 'совсем', 'спасибо', 'стал', 'суть', 'т', 'та', 'так', 'такая', 'также', 'такие', 'такое', 'такой', 'там', 'твой', 'твоя', 'твоё', 'те', 'тебе', 'тебя', 'тем', 'теми', 'теперь', 'тех', 'то', 'тобой', 'тобою', 'тогда', 'того', 'тоже', 'только', 'том', 'тому', 'тот', 'тою', 'третий', 'три', 'тринадцатый', 'тринадцать', 'ту', 'туда', 'тут', 'ты', 'тысяч', 'у', 'уж', 'уже', 'уметь', 'хорошо', 'хотеть', 'хоть', 'хотя', 'хочешь', 'часто', 'чаще', 'чего', 'человек', 'чем', 'чему', 'через', 'четвертый', 'четыре', 'четырнадцатый', 'четырнадцать', 'что', 'чтоб', 'чтобы', 'чуть', 'шестнадцатый', 'шестнадцать', 'шестой', 'шесть', 'эта', 'эти', 'этим', 'этими', 'этих', 'это', 'этого', 'этой', 'этом', 'этому', 'этот', 'эту', 'я',);
classes/ignored-words/sv_SE.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ return array( 'aderton', 'adertonde', 'adjö', 'aldrig', 'alla', 'allas', 'allt', 'alltid', 'alltså', 'andra', 'andras', 'annan', 'annat', 'artonde', 'artonn', 'att', 'av', 'bakom', 'bara', 'behöva', 'behövas', 'behövde', 'behövt', 'beslut', 'beslutat', 'beslutit', 'bland', 'blev', 'bli', 'blir', 'blivit', 'bort', 'borta', 'bra', 'bäst', 'bättre', 'båda', 'bådas', 'dag', 'dagar', 'dagarna', 'dagen', 'de', 'del', 'delen', 'dem', 'den', 'deras', 'dess', 'det', 'detta', 'dig', 'din', 'dina', 'dit', 'ditt', 'dock', 'du', 'där', 'därför', 'då', 'efter', 'eftersom', 'elfte', 'eller', 'elva', 'en', 'enkel', 'enkelt', 'enkla', 'enligt', 'er', 'era', 'ert', 'ett', 'ettusen', 'fanns', 'fem', 'femte', 'femtio', 'femtionde', 'femton', 'femtonde', 'fick', 'fin', 'finnas', 'finns', 'fjorton', 'fjortonde', 'fjärde', 'fler', 'flera', 'flesta', 'fram', 'framför', 'från', 'fyra', 'fyrtio', 'fyrtionde', 'få', 'får', 'fått', 'följande', 'för', 'före', 'förlåt', 'förra', 'första', 'genast', 'genom', 'gick', 'gjorde', 'gjort', 'god', 'goda', 'godare', 'godast', 'gott', 'gälla', 'gäller', 'gällt', 'gärna', 'gå', 'går', 'gått', 'gör', 'göra', 'ha', 'hade', 'haft', 'han', 'hans', 'har', 'heller', 'hellre', 'helst', 'helt', 'henne', 'hennes', 'hit', 'hon', 'honom', 'hundra', 'hundraen', 'hundraett', 'hur', 'här', 'hög', 'höger', 'högre', 'högst', 'i', 'ibland', 'idag', 'igen', 'igår', 'imorgon', 'in', 'inför', 'inga', 'ingen', 'ingenting', 'inget', 'innan', 'inne', 'inom', 'inte', 'inuti', 'ja', 'jag', 'jämfört', 'kan', 'kanske', 'knappast', 'kom', 'komma', 'kommer', 'kommit', 'kr', 'kunde', 'kunna', 'kunnat', 'kvar', 'legat', 'ligga', 'ligger', 'lika', 'likställd', 'likställda', 'lilla', 'lite', 'liten', 'litet', 'länge', 'längre', 'längst', 'lätt', 'lättare', 'lättast', 'långsam', 'långsammare', 'långsammast', 'långsamt', 'långt', 'man', 'med', 'mellan', 'men', 'mer', 'mera', 'mest', 'mig', 'min', 'mina', 'mindre', 'minst', 'mitt', 'mittemot', 'mot', 'mycket', 'många', 'måste', 'möjlig', 'möjligen', 'möjligt', 'möjligtvis', 'ned', 'nederst', 'nedersta', 'nedre', 'nej', 'ner', 'ni', 'nio', 'nionde', 'nittio', 'nittionde', 'nitton', 'nittonde', 'nog', 'noll', 'nr', 'nu', 'nummer', 'när', 'nästa', 'någon', 'någonting', 'något', 'några', 'nödvändig', 'nödvändiga', 'nödvändigt', 'nödvändigtvis', 'och', 'också', 'ofta', 'oftast', 'olika', 'olikt', 'om', 'oss', 'på', 'rakt', 'redan', 'rätt', 'sade', 'sagt', 'samma', 'sedan', 'senare', 'senast', 'sent', 'sex', 'sextio', 'sextionde', 'sexton', 'sextonde', 'sig', 'sin', 'sina', 'sist', 'sista', 'siste', 'sitt', 'sju', 'sjunde', 'sjuttio', 'sjuttionde', 'sjutton', 'sjuttonde', 'sjätte', 'ska', 'skall', 'skulle', 'slutligen', 'små', 'smått', 'snart', 'som', 'stor', 'stora', 'stort', 'större', 'störst', 'säga', 'säger', 'sämre', 'sämst', 'så', 'tack', 'tidig', 'tidigare', 'tidigast', 'tidigt', 'till', 'tills', 'tillsammans', 'tio', 'tionde', 'tjugo', 'tjugoen', 'tjugoett', 'tjugonde', 'tjugotre', 'tjugotvå', 'tjungo', 'tolfte', 'tolv', 'tre', 'tredje', 'trettio', 'trettionde', 'tretton', 'trettonde', 'två', 'tvåhundra', 'under', 'upp', 'ur', 'ursäkt', 'ut', 'utan', 'utanför', 'ute', 'vad', 'var', 'vara', 'varför', 'varifrån', 'varit', 'varken', 'varsågod', 'vart', 'vem', 'vems', 'verkligen', 'vi', 'vid', 'vidare', 'viktig', 'viktigare', 'viktigast', 'viktigt', 'vilka', 'vilken', 'vilket', 'vill', 'vänster', 'vänstra', 'värre', 'vår', 'våra', 'vårt', 'än', 'ännu', 'även', 'åtminstone', 'åtta', 'åttio', 'åttionde', 'åttonde', 'över', 'övermorgon', 'överst', 'övre',);
classes/settings/class-settings.php CHANGED
@@ -40,10 +40,10 @@ class RP4WP_Settings {
40
 
41
  // The fields
42
  $this->sections = array(
43
- self::PREFIX . 'automatic_linking' => array(
44
- 'id' => 'automatic_linking',
45
- 'label' => __( 'Automatic post linking', 'related-posts-for-wp' ),
46
- 'description' => __( 'The following options affect how related posts are automatically linked.', 'related-posts-for-wp' ),
47
  'fields' => array(
48
  array(
49
  'id' => 'automatic_linking',
@@ -58,13 +58,7 @@ class RP4WP_Settings {
58
  'description' => __( 'The amount of automatically linked post', 'related-posts-for-wp' ),
59
  'type' => 'text',
60
  'default' => '3',
61
- )
62
- ) ),
63
- self::PREFIX . 'css' => array(
64
- 'id' => 'css',
65
- 'label' => __( 'Frontend Settings', 'related-posts-for-wp' ),
66
- 'description' => __( 'The following options affect how related posts are displayed on the frontend.', 'related-posts-for-wp' ),
67
- 'fields' => array(
68
  array(
69
  'id' => 'heading_text',
70
  'label' => __( 'Heading text', 'related-posts-for-wp' ),
@@ -78,7 +72,13 @@ class RP4WP_Settings {
78
  'description' => __( 'The amount of words to be displayed below the title on website. To disable, set value to 0.', 'related-posts-for-wp' ),
79
  'type' => 'text',
80
  'default' => '15',
81
- ),
 
 
 
 
 
 
82
  array(
83
  'id' => 'display_image',
84
  'label' => __( 'Display Image', 'related-posts-for-wp' ),
@@ -94,10 +94,10 @@ class RP4WP_Settings {
94
  'default' => implode( PHP_EOL, $css_default_lines ),
95
  )
96
  ) ),
97
- self::PREFIX . 'restart_wizard' => array(
98
- 'id' => 'restart_wizard',
99
- 'label' => __( 'Restart wizard', 'related-posts-for-wp' ),
100
- 'description' => __( "Remove the cache and all existing related post links and restart the wizard.", 'related-posts-for-wp' ),
101
  'fields' => array(
102
  array(
103
  'id' => 'restart_wizard_button',
@@ -107,12 +107,6 @@ class RP4WP_Settings {
107
  'href' => admin_url( '?page=rp4wp_install&reinstall=1&rp4wp_nonce=' . wp_create_nonce( RP4WP_Constants::NONCE_INSTALL ) ),
108
  'default' => __( 'Restart wizard', 'related-posts-for-wp' ),
109
  ),
110
- ) ),
111
- self::PREFIX . 'misc' => array(
112
- 'id' => 'misc',
113
- 'label' => __( 'Miscellaneous Settings', 'related-posts-for-wp' ),
114
- 'description' => __( "A shelter for options that just don't fit in.", 'related-posts-for-wp' ),
115
- 'fields' => array(
116
  array(
117
  'id' => 'clean_on_uninstall',
118
  'label' => __( 'Remove Data on Uninstall?', 'related-posts-for-wp' ),
@@ -154,7 +148,7 @@ class RP4WP_Settings {
154
 
155
  // Add the section
156
  add_settings_section(
157
- self::PREFIX . $section['id'],
158
  $section['label'],
159
  array( $this, 'section_intro' ),
160
  self::PAGE
@@ -166,11 +160,11 @@ class RP4WP_Settings {
166
 
167
  // Add section
168
  add_settings_field(
169
- self::PREFIX . $field['id'],
170
  $field['label'],
171
  array( $this, 'do_field' ),
172
  self::PAGE,
173
- self::PREFIX . $section['id'],
174
  $field
175
  );
176
 
@@ -179,7 +173,6 @@ class RP4WP_Settings {
179
 
180
  }
181
 
182
-
183
  // Register section setting
184
  register_setting( self::PAGE, self::PAGE, array( $this, 'sanitize_option' ) );
185
  }
40
 
41
  // The fields
42
  $this->sections = array(
43
+ 'general' => array(
44
+ 'id' => 'general',
45
+ 'label' => __( 'General', 'related-posts-for-wp' ),
46
+ 'description' => __( 'The following options affect the general behaviour of the plugin.', 'related-posts-for-wp' ),
47
  'fields' => array(
48
  array(
49
  'id' => 'automatic_linking',
58
  'description' => __( 'The amount of automatically linked post', 'related-posts-for-wp' ),
59
  'type' => 'text',
60
  'default' => '3',
61
+ ),
 
 
 
 
 
 
62
  array(
63
  'id' => 'heading_text',
64
  'label' => __( 'Heading text', 'related-posts-for-wp' ),
72
  'description' => __( 'The amount of words to be displayed below the title on website. To disable, set value to 0.', 'related-posts-for-wp' ),
73
  'type' => 'text',
74
  'default' => '15',
75
+ )
76
+ ) ),
77
+ 'styling' => array(
78
+ 'id' => 'styling',
79
+ 'label' => __( 'Styling', 'related-posts-for-wp' ),
80
+ 'description' => __( 'The following options affect how related posts are displayed on the frontend.', 'related-posts-for-wp' ),
81
+ 'fields' => array(
82
  array(
83
  'id' => 'display_image',
84
  'label' => __( 'Display Image', 'related-posts-for-wp' ),
94
  'default' => implode( PHP_EOL, $css_default_lines ),
95
  )
96
  ) ),
97
+ 'misc' => array(
98
+ 'id' => 'misc',
99
+ 'label' => __( 'Misc', 'related-posts-for-wp' ),
100
+ 'description' => __( "A shelter for options that just don't fit in anywhere else.", 'related-posts-for-wp' ),
101
  'fields' => array(
102
  array(
103
  'id' => 'restart_wizard_button',
107
  'href' => admin_url( '?page=rp4wp_install&reinstall=1&rp4wp_nonce=' . wp_create_nonce( RP4WP_Constants::NONCE_INSTALL ) ),
108
  'default' => __( 'Restart wizard', 'related-posts-for-wp' ),
109
  ),
 
 
 
 
 
 
110
  array(
111
  'id' => 'clean_on_uninstall',
112
  'label' => __( 'Remove Data on Uninstall?', 'related-posts-for-wp' ),
148
 
149
  // Add the section
150
  add_settings_section(
151
+ $section['id'],
152
  $section['label'],
153
  array( $this, 'section_intro' ),
154
  self::PAGE
160
 
161
  // Add section
162
  add_settings_field(
163
+ $field['id'],
164
  $field['label'],
165
  array( $this, 'do_field' ),
166
  self::PAGE,
167
+ $section['id'],
168
  $field
169
  );
170
 
173
 
174
  }
175
 
 
176
  // Register section setting
177
  register_setting( self::PAGE, self::PAGE, array( $this, 'sanitize_option' ) );
178
  }
composer.lock ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_readme": [
3
+ "This file locks the dependencies of your project to a known state",
4
+ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
5
+ "This file is @generated automatically"
6
+ ],
7
+ "hash": "ababe672a96bb294fc7260e09f940f0e",
8
+ "packages": [
9
+ {
10
+ "name": "xrstf/composer-php52",
11
+ "version": "v1.0.17",
12
+ "source": {
13
+ "type": "hg",
14
+ "url": "https://bitbucket.org/xrstf/composer-php52",
15
+ "reference": "70b853668d6c3f97b63dafcfaeebb622bf08fd30"
16
+ },
17
+ "dist": {
18
+ "type": "zip",
19
+ "url": "https://bitbucket.org/xrstf/composer-php52/get/70b853668d6c3f97b63dafcfaeebb622bf08fd30.zip",
20
+ "reference": "70b853668d6c3f97b63dafcfaeebb622bf08fd30",
21
+ "shasum": ""
22
+ },
23
+ "type": "library",
24
+ "extra": {
25
+ "branch-alias": {
26
+ "dev-default": "1.x-dev"
27
+ }
28
+ },
29
+ "autoload": {
30
+ "psr-0": {
31
+ "xrstf\\Composer52": "lib/"
32
+ }
33
+ },
34
+ "notification-url": "https://packagist.org/downloads/",
35
+ "license": [
36
+ "MIT"
37
+ ],
38
+ "homepage": "http://www.xrstf.de/",
39
+ "time": "2015-02-01 14:28:15"
40
+ }
41
+ ],
42
+ "packages-dev": [],
43
+ "aliases": [],
44
+ "minimum-stability": "stable",
45
+ "stability-flags": [],
46
+ "prefer-stable": false,
47
+ "prefer-lowest": false,
48
+ "platform": [],
49
+ "platform-dev": []
50
+ }
includes/actions.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ return array(
4
+ 'admin_scripts',
5
+ 'ajax_delete_link',
6
+ 'ajax_install_link_posts',
7
+ 'ajax_install_save_words',
8
+ 'delete_words',
9
+ 'frontend_css',
10
+ 'link_related_screen',
11
+ 'meta_box',
12
+ 'meta_box_ajax_sort',
13
+ 'page_install',
14
+ 'post_type',
15
+ 'related_auto_link',
16
+ 'related_save_words',
17
+ 'settings_page',
18
+ 'shortcode',
19
+ 'widget'
20
+ );
includes/filters.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ return array(
4
+ 'after_post',
5
+ 'plugin_links',
6
+ 'set_screen_option'
7
+ );
includes/functions.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * @since 1.0.0
5
+ * @access public
6
+ *
7
+ * @return RP4WP
8
+ */
9
+ function RP4WP() {
10
+ return RP4WP::get();
11
+ }
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Related Posts for WordPress ===
2
- Contributors: barrykooij
3
- Donate link: http://www.relatedpostsforwp.com/checkout/
4
  Tags: related posts for wordpress, related posts for wp, simple related posts, easy related posts, related posts, related, relations, internal links, seo, bounce rate
5
  Requires at least: 3.6
6
- Tested up to: 4.1.1
7
- Stable tag: 1.8.2
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -21,8 +21,8 @@ Our installation wizard will do all the hard work for you, simply activate the p
21
  > #### Related Posts for WordPress Premium
22
  > There's an even better version of this plugin that comes with the following extra features:<br />
23
  >
 
24
  > - Cross Custom Post Type Support<br />
25
- > - Multiple Related Post Styles<br />
26
  > - Overwritable templates<br />
27
  > - Custom Taxonomy Support<br />
28
  > - Adjustable Weights<br />
@@ -95,7 +95,10 @@ Yes, you can use `rp4wp_children();`.<br />
95
  [More information on the theme function can be found here](https://www.relatedpostsforwp.com/documentation/theme-functions-to-display-related-posts/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=faq-item).
96
 
97
  = Is there a shortcode? =
98
- Yes. To display your related posts via a shortcode use: [rp4wp]
 
 
 
99
 
100
  = Is there a widget? =
101
  Yes there is!
@@ -115,6 +118,25 @@ There is one custom table created for the post cache, this table will however no
115
 
116
  == Changelog ==
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  = 1.8.2: April 20, 2015 =
119
  * Escaped view filter URL when manually linking posts to prevent possible XSS.
120
 
1
  === Related Posts for WordPress ===
2
+ Contributors: never5, barrykooij
3
+ Donate link: http://www.barrykooij.com/donate/
4
  Tags: related posts for wordpress, related posts for wp, simple related posts, easy related posts, related posts, related, relations, internal links, seo, bounce rate
5
  Requires at least: 3.6
6
+ Tested up to: 4.2.2
7
+ Stable tag: 1.9.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
21
  > #### Related Posts for WordPress Premium
22
  > There's an even better version of this plugin that comes with the following extra features:<br />
23
  >
24
+ > - Full Styling Control With Our Configurator<br />
25
  > - Cross Custom Post Type Support<br />
 
26
  > - Overwritable templates<br />
27
  > - Custom Taxonomy Support<br />
28
  > - Adjustable Weights<br />
95
  [More information on the theme function can be found here](https://www.relatedpostsforwp.com/documentation/theme-functions-to-display-related-posts/?utm_source=wp-plugin-repo&utm_medium=link&utm_campaign=faq-item).
96
 
97
  = Is there a shortcode? =
98
+ Yes. To display your related posts via a shortcode use: `[rp4wp]`
99
+
100
+ = Can I limit the amount of related posts in the shortcode? =
101
+ Yes. Use the limit attribute, for example `[rp4wp limit=1]` for one related post.
102
 
103
  = Is there a widget? =
104
  Yes there is!
118
 
119
  == Changelog ==
120
 
121
+ = 1.9.0: June 29, 2015 =
122
+ * Feature: Add pagination to manual post link table.
123
+ * Feature: Added id attribute to [rp4wp] shortcode.
124
+ * Feature: Added limit attribute to [rp4wp] shortcode.
125
+ * Feature: Added Brazilian Portuguese commonly used words.
126
+ * Feature: Added Czech commonly used words.
127
+ * Feature: Added Bulgarian commonly used words.
128
+ * Feature: Added Russian commonly used words.
129
+ * Feature: Added Swedish commonly used words.
130
+ * Feature: Added Spanish commonly used words.
131
+ * Feature: Added Norwegian Bokmål commonly used words.
132
+ * Tweak: Now displaying amount of posts left to link in installer.
133
+ * Tweak: Weight must be > 0 and words must be array in order to start adding words.
134
+ * Tweak: Add Composer autoloading (PHP 5.2 compatible) instead of custom autoloader, props [Danny van Kooten](https://github.com/dannyvankooten).
135
+ * Tweak: Static loading of hooks instead of directory scan, props [Danny van Kooten](https://github.com/dannyvankooten).
136
+ * Tweak: Added filter: rp4wp_get_children_link_args in RP4WP_Post_Link_Manager:get_children().
137
+ * Tweak: Added filter: rp4wp_get_children_child_args in RP4WP_Post_Link_Manager:get_children().
138
+ * Tweak: Fixed an issue with encoding non ASCII characters.
139
+
140
  = 1.8.2: April 20, 2015 =
141
  * Escaped view filter URL when manually linking posts to prevent possible XSS.
142
 
related-posts-for-wp.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Related Posts for WordPress
4
  Plugin URI: http://www.relatedpostsforwp.com/
5
  Description: Related Posts for WordPress, the best way to display related posts in WordPress.
6
- Version: 1.8.2
7
  Author: Barry Kooij
8
  Author URI: http://www.barrykooij.com/
9
  License: GPL v3
@@ -36,10 +36,11 @@ function rp4wp_load_plugin() {
36
  // Define
37
  define( 'RP4WP_PLUGIN_FILE', __FILE__ );
38
 
39
- // Load main plugin file
40
- require_once plugin_dir_path( RP4WP_PLUGIN_FILE ) . 'classes/class-rp4wp.php';
41
- RP4WP();
42
 
 
 
43
  }
44
 
45
  // Create object - Plugin init
3
  Plugin Name: Related Posts for WordPress
4
  Plugin URI: http://www.relatedpostsforwp.com/
5
  Description: Related Posts for WordPress, the best way to display related posts in WordPress.
6
+ Version: 1.9.0
7
  Author: Barry Kooij
8
  Author URI: http://www.barrykooij.com/
9
  License: GPL v3
36
  // Define
37
  define( 'RP4WP_PLUGIN_FILE', __FILE__ );
38
 
39
+ require dirname( __FILE__ ) . '/vendor/autoload_52.php';
40
+ require dirname( __FILE__ ) . '/includes/functions.php';
 
41
 
42
+ // Instantiate main plugin object
43
+ RP4WP();
44
  }
45
 
46
  // Create object - Plugin init
vendor/autoload_52.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_52.php generated by xrstf/composer-php52
4
+
5
+ require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
+
7
+ return ComposerAutoloaderInit0c9c1396e7a1bddfc908f1432cae5da0::getLoader();
vendor/composer/ClassLoader.php ADDED
@@ -0,0 +1,413 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * This file is part of Composer.
5
+ *
6
+ * (c) Nils Adermann <naderman@naderman.de>
7
+ * Jordi Boggiano <j.boggiano@seld.be>
8
+ *
9
+ * For the full copyright and license information, please view the LICENSE
10
+ * file that was distributed with this source code.
11
+ */
12
+
13
+ namespace Composer\Autoload;
14
+
15
+ /**
16
+ * ClassLoader implements a PSR-0 class loader
17
+ *
18
+ * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
19
+ *
20
+ * $loader = new \Composer\Autoload\ClassLoader();
21
+ *
22
+ * // register classes with namespaces
23
+ * $loader->add('Symfony\Component', __DIR__.'/component');
24
+ * $loader->add('Symfony', __DIR__.'/framework');
25
+ *
26
+ * // activate the autoloader
27
+ * $loader->register();
28
+ *
29
+ * // to enable searching the include path (eg. for PEAR packages)
30
+ * $loader->setUseIncludePath(true);
31
+ *
32
+ * In this example, if you try to use a class in the Symfony\Component
33
+ * namespace or one of its children (Symfony\Component\Console for instance),
34
+ * the autoloader will first look for the class under the component/
35
+ * directory, and it will then fallback to the framework/ directory if not
36
+ * found before giving up.
37
+ *
38
+ * This class is loosely based on the Symfony UniversalClassLoader.
39
+ *
40
+ * @author Fabien Potencier <fabien@symfony.com>
41
+ * @author Jordi Boggiano <j.boggiano@seld.be>
42
+ */
43
+ class ClassLoader
44
+ {
45
+ // PSR-4
46
+ private $prefixLengthsPsr4 = array();
47
+ private $prefixDirsPsr4 = array();
48
+ private $fallbackDirsPsr4 = array();
49
+
50
+ // PSR-0
51
+ private $prefixesPsr0 = array();
52
+ private $fallbackDirsPsr0 = array();
53
+
54
+ private $useIncludePath = false;
55
+ private $classMap = array();
56
+
57
+ private $classMapAuthoritative = false;
58
+
59
+ public function getPrefixes()
60
+ {
61
+ if (!empty($this->prefixesPsr0)) {
62
+ return call_user_func_array('array_merge', $this->prefixesPsr0);
63
+ }
64
+
65
+ return array();
66
+ }
67
+
68
+ public function getPrefixesPsr4()
69
+ {
70
+ return $this->prefixDirsPsr4;
71
+ }
72
+
73
+ public function getFallbackDirs()
74
+ {
75
+ return $this->fallbackDirsPsr0;
76
+ }
77
+
78
+ public function getFallbackDirsPsr4()
79
+ {
80
+ return $this->fallbackDirsPsr4;
81
+ }
82
+
83
+ public function getClassMap()
84
+ {
85
+ return $this->classMap;
86
+ }
87
+
88
+ /**
89
+ * @param array $classMap Class to filename map
90
+ */
91
+ public function addClassMap(array $classMap)
92
+ {
93
+ if ($this->classMap) {
94
+ $this->classMap = array_merge($this->classMap, $classMap);
95
+ } else {
96
+ $this->classMap = $classMap;
97
+ }
98
+ }
99
+
100
+ /**
101
+ * Registers a set of PSR-0 directories for a given prefix, either
102
+ * appending or prepending to the ones previously set for this prefix.
103
+ *
104
+ * @param string $prefix The prefix
105
+ * @param array|string $paths The PSR-0 root directories
106
+ * @param bool $prepend Whether to prepend the directories
107
+ */
108
+ public function add($prefix, $paths, $prepend = false)
109
+ {
110
+ if (!$prefix) {
111
+ if ($prepend) {
112
+ $this->fallbackDirsPsr0 = array_merge(
113
+ (array) $paths,
114
+ $this->fallbackDirsPsr0
115
+ );
116
+ } else {
117
+ $this->fallbackDirsPsr0 = array_merge(
118
+ $this->fallbackDirsPsr0,
119
+ (array) $paths
120
+ );
121
+ }
122
+
123
+ return;
124
+ }
125
+
126
+ $first = $prefix[0];
127
+ if (!isset($this->prefixesPsr0[$first][$prefix])) {
128
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
129
+
130
+ return;
131
+ }
132
+ if ($prepend) {
133
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
134
+ (array) $paths,
135
+ $this->prefixesPsr0[$first][$prefix]
136
+ );
137
+ } else {
138
+ $this->prefixesPsr0[$first][$prefix] = array_merge(
139
+ $this->prefixesPsr0[$first][$prefix],
140
+ (array) $paths
141
+ );
142
+ }
143
+ }
144
+
145
+ /**
146
+ * Registers a set of PSR-4 directories for a given namespace, either
147
+ * appending or prepending to the ones previously set for this namespace.
148
+ *
149
+ * @param string $prefix The prefix/namespace, with trailing '\\'
150
+ * @param array|string $paths The PSR-0 base directories
151
+ * @param bool $prepend Whether to prepend the directories
152
+ *
153
+ * @throws \InvalidArgumentException
154
+ */
155
+ public function addPsr4($prefix, $paths, $prepend = false)
156
+ {
157
+ if (!$prefix) {
158
+ // Register directories for the root namespace.
159
+ if ($prepend) {
160
+ $this->fallbackDirsPsr4 = array_merge(
161
+ (array) $paths,
162
+ $this->fallbackDirsPsr4
163
+ );
164
+ } else {
165
+ $this->fallbackDirsPsr4 = array_merge(
166
+ $this->fallbackDirsPsr4,
167
+ (array) $paths
168
+ );
169
+ }
170
+ } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
171
+ // Register directories for a new namespace.
172
+ $length = strlen($prefix);
173
+ if ('\\' !== $prefix[$length - 1]) {
174
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
175
+ }
176
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
177
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
178
+ } elseif ($prepend) {
179
+ // Prepend directories for an already registered namespace.
180
+ $this->prefixDirsPsr4[$prefix] = array_merge(
181
+ (array) $paths,
182
+ $this->prefixDirsPsr4[$prefix]
183
+ );
184
+ } else {
185
+ // Append directories for an already registered namespace.
186
+ $this->prefixDirsPsr4[$prefix] = array_merge(
187
+ $this->prefixDirsPsr4[$prefix],
188
+ (array) $paths
189
+ );
190
+ }
191
+ }
192
+
193
+ /**
194
+ * Registers a set of PSR-0 directories for a given prefix,
195
+ * replacing any others previously set for this prefix.
196
+ *
197
+ * @param string $prefix The prefix
198
+ * @param array|string $paths The PSR-0 base directories
199
+ */
200
+ public function set($prefix, $paths)
201
+ {
202
+ if (!$prefix) {
203
+ $this->fallbackDirsPsr0 = (array) $paths;
204
+ } else {
205
+ $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
206
+ }
207
+ }
208
+
209
+ /**
210
+ * Registers a set of PSR-4 directories for a given namespace,
211
+ * replacing any others previously set for this namespace.
212
+ *
213
+ * @param string $prefix The prefix/namespace, with trailing '\\'
214
+ * @param array|string $paths The PSR-4 base directories
215
+ *
216
+ * @throws \InvalidArgumentException
217
+ */
218
+ public function setPsr4($prefix, $paths)
219
+ {
220
+ if (!$prefix) {
221
+ $this->fallbackDirsPsr4 = (array) $paths;
222
+ } else {
223
+ $length = strlen($prefix);
224
+ if ('\\' !== $prefix[$length - 1]) {
225
+ throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
226
+ }
227
+ $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
228
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
229
+ }
230
+ }
231
+
232
+ /**
233
+ * Turns on searching the include path for class files.
234
+ *
235
+ * @param bool $useIncludePath
236
+ */
237
+ public function setUseIncludePath($useIncludePath)
238
+ {
239
+ $this->useIncludePath = $useIncludePath;
240
+ }
241
+
242
+ /**
243
+ * Can be used to check if the autoloader uses the include path to check
244
+ * for classes.
245
+ *
246
+ * @return bool
247
+ */
248
+ public function getUseIncludePath()
249
+ {
250
+ return $this->useIncludePath;
251
+ }
252
+
253
+ /**
254
+ * Turns off searching the prefix and fallback directories for classes
255
+ * that have not been registered with the class map.
256
+ *
257
+ * @param bool $classMapAuthoritative
258
+ */
259
+ public function setClassMapAuthoritative($classMapAuthoritative)
260
+ {
261
+ $this->classMapAuthoritative = $classMapAuthoritative;
262
+ }
263
+
264
+ /**
265
+ * Should class lookup fail if not found in the current class map?
266
+ *
267
+ * @return bool
268
+ */
269
+ public function isClassMapAuthoritative()
270
+ {
271
+ return $this->classMapAuthoritative;
272
+ }
273
+
274
+ /**
275
+ * Registers this instance as an autoloader.
276
+ *
277
+ * @param bool $prepend Whether to prepend the autoloader or not
278
+ */
279
+ public function register($prepend = false)
280
+ {
281
+ spl_autoload_register(array($this, 'loadClass'), true, $prepend);
282
+ }
283
+
284
+ /**
285
+ * Unregisters this instance as an autoloader.
286
+ */
287
+ public function unregister()
288
+ {
289
+ spl_autoload_unregister(array($this, 'loadClass'));
290
+ }
291
+
292
+ /**
293
+ * Loads the given class or interface.
294
+ *
295
+ * @param string $class The name of the class
296
+ * @return bool|null True if loaded, null otherwise
297
+ */
298
+ public function loadClass($class)
299
+ {
300
+ if ($file = $this->findFile($class)) {
301
+ includeFile($file);
302
+
303
+ return true;
304
+ }
305
+ }
306
+
307
+ /**
308
+ * Finds the path to the file where the class is defined.
309
+ *
310
+ * @param string $class The name of the class
311
+ *
312
+ * @return string|false The path if found, false otherwise
313
+ */
314
+ public function findFile($class)
315
+ {
316
+ // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
317
+ if ('\\' == $class[0]) {
318
+ $class = substr($class, 1);
319
+ }
320
+
321
+ // class map lookup
322
+ if (isset($this->classMap[$class])) {
323
+ return $this->classMap[$class];
324
+ }
325
+ if ($this->classMapAuthoritative) {
326
+ return false;
327
+ }
328
+
329
+ $file = $this->findFileWithExtension($class, '.php');
330
+
331
+ // Search for Hack files if we are running on HHVM
332
+ if ($file === null && defined('HHVM_VERSION')) {
333
+ $file = $this->findFileWithExtension($class, '.hh');
334
+ }
335
+
336
+ if ($file === null) {
337
+ // Remember that this class does not exist.
338
+ return $this->classMap[$class] = false;
339
+ }
340
+
341
+ return $file;
342
+ }
343
+
344
+ private function findFileWithExtension($class, $ext)
345
+ {
346
+ // PSR-4 lookup
347
+ $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
348
+
349
+ $first = $class[0];
350
+ if (isset($this->prefixLengthsPsr4[$first])) {
351
+ foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
352
+ if (0 === strpos($class, $prefix)) {
353
+ foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
354
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
355
+ return $file;
356
+ }
357
+ }
358
+ }
359
+ }
360
+ }
361
+
362
+ // PSR-4 fallback dirs
363
+ foreach ($this->fallbackDirsPsr4 as $dir) {
364
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
365
+ return $file;
366
+ }
367
+ }
368
+
369
+ // PSR-0 lookup
370
+ if (false !== $pos = strrpos($class, '\\')) {
371
+ // namespaced class name
372
+ $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
373
+ . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
374
+ } else {
375
+ // PEAR-like class name
376
+ $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
377
+ }
378
+
379
+ if (isset($this->prefixesPsr0[$first])) {
380
+ foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
381
+ if (0 === strpos($class, $prefix)) {
382
+ foreach ($dirs as $dir) {
383
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
384
+ return $file;
385
+ }
386
+ }
387
+ }
388
+ }
389
+ }
390
+
391
+ // PSR-0 fallback dirs
392
+ foreach ($this->fallbackDirsPsr0 as $dir) {
393
+ if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
394
+ return $file;
395
+ }
396
+ }
397
+
398
+ // PSR-0 include paths.
399
+ if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
400
+ return $file;
401
+ }
402
+ }
403
+ }
404
+
405
+ /**
406
+ * Scope isolated include.
407
+ *
408
+ * Prevents access to $this/self from included files.
409
+ */
410
+ function includeFile($file)
411
+ {
412
+ include $file;
413
+ }
vendor/composer/ClassLoader52.php ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ * Copyright (c) 2013, Christoph Mewes, http://www.xrstf.de
4
+ *
5
+ * This file is released under the terms of the MIT license. You can find the
6
+ * complete text in the attached LICENSE file or online at:
7
+ *
8
+ * http://www.opensource.org/licenses/mit-license.php
9
+ *
10
+ * --------------------------------------------------------------------------
11
+ *
12
+ * 99% of this is copied as-is from the original Composer source code and is
13
+ * released under MIT license as well. Copyright goes to:
14
+ *
15
+ * - Fabien Potencier <fabien@symfony.com>
16
+ * - Jordi Boggiano <j.boggiano@seld.be>
17
+ */
18
+
19
+ class xrstf_Composer52_ClassLoader {
20
+ private $prefixes = array();
21
+ private $fallbackDirs = array();
22
+ private $useIncludePath = false;
23
+ private $classMap = array();
24
+ private $classMapAuthoratative = false;
25
+ private $allowUnderscore = false;
26
+
27
+ /**
28
+ * @param boolean $flag true to allow class names with a leading underscore, false to disable
29
+ */
30
+ public function setAllowUnderscore($flag) {
31
+ $this->allowUnderscore = (boolean) $flag;
32
+ }
33
+
34
+ /**
35
+ * @return array
36
+ */
37
+ public function getPrefixes() {
38
+ return $this->prefixes;
39
+ }
40
+
41
+ /**
42
+ * Turns off searching the prefix and fallback directories for classes
43
+ * that have not been registered with the class map.
44
+ *
45
+ * @param bool $classMapAuthoratative
46
+ */
47
+ public function setClassMapAuthoritative($classMapAuthoratative) {
48
+ $this->classMapAuthoratative = $classMapAuthoratative;
49
+ }
50
+
51
+ /**
52
+ * Should class lookup fail if not found in the current class map?
53
+ *
54
+ * @return bool
55
+ */
56
+ public function getClassMapAuthoratative() {
57
+ return $this->classMapAuthoratative;
58
+ }
59
+
60
+ /**
61
+ * @return array
62
+ */
63
+ public function getFallbackDirs() {
64
+ return $this->fallbackDirs;
65
+ }
66
+
67
+ /**
68
+ * @return array
69
+ */
70
+ public function getClassMap() {
71
+ return $this->classMap;
72
+ }
73
+
74
+ /**
75
+ * @param array $classMap class to filename map
76
+ */
77
+ public function addClassMap(array $classMap) {
78
+ if ($this->classMap) {
79
+ $this->classMap = array_merge($this->classMap, $classMap);
80
+ }
81
+ else {
82
+ $this->classMap = $classMap;
83
+ }
84
+ }
85
+
86
+ /**
87
+ * Registers a set of classes, merging with any others previously set.
88
+ *
89
+ * @param string $prefix the classes prefix
90
+ * @param array|string $paths the location(s) of the classes
91
+ * @param bool $prepend prepend the location(s)
92
+ */
93
+ public function add($prefix, $paths, $prepend = false) {
94
+ if (!$prefix) {
95
+ if ($prepend) {
96
+ $this->fallbackDirs = array_merge(
97
+ (array) $paths,
98
+ $this->fallbackDirs
99
+ );
100
+ }
101
+ else {
102
+ $this->fallbackDirs = array_merge(
103
+ $this->fallbackDirs,
104
+ (array) $paths
105
+ );
106
+ }
107
+
108
+ return;
109
+ }
110
+
111
+ if (!isset($this->prefixes[$prefix])) {
112
+ $this->prefixes[$prefix] = (array) $paths;
113
+ return;
114
+ }
115
+
116
+ if ($prepend) {
117
+ $this->prefixes[$prefix] = array_merge(
118
+ (array) $paths,
119
+ $this->prefixes[$prefix]
120
+ );
121
+ }
122
+ else {
123
+ $this->prefixes[$prefix] = array_merge(
124
+ $this->prefixes[$prefix],
125
+ (array) $paths
126
+ );
127
+ }
128
+ }
129
+
130
+ /**
131
+ * Registers a set of classes, replacing any others previously set.
132
+ *
133
+ * @param string $prefix the classes prefix
134
+ * @param array|string $paths the location(s) of the classes
135
+ */
136
+ public function set($prefix, $paths) {
137
+ if (!$prefix) {
138
+ $this->fallbackDirs = (array) $paths;
139
+ return;
140
+ }
141
+
142
+ $this->prefixes[$prefix] = (array) $paths;
143
+ }
144
+
145
+ /**
146
+ * Turns on searching the include path for class files.
147
+ *
148
+ * @param bool $useIncludePath
149
+ */
150
+ public function setUseIncludePath($useIncludePath) {
151
+ $this->useIncludePath = $useIncludePath;
152
+ }
153
+
154
+ /**
155
+ * Can be used to check if the autoloader uses the include path to check
156
+ * for classes.
157
+ *
158
+ * @return bool
159
+ */
160
+ public function getUseIncludePath() {
161
+ return $this->useIncludePath;
162
+ }
163
+
164
+ /**
165
+ * Registers this instance as an autoloader.
166
+ */
167
+ public function register() {
168
+ spl_autoload_register(array($this, 'loadClass'), true);
169
+ }
170
+
171
+ /**
172
+ * Unregisters this instance as an autoloader.
173
+ */
174
+ public function unregister() {
175
+ spl_autoload_unregister(array($this, 'loadClass'));
176
+ }
177
+
178
+ /**
179
+ * Loads the given class or interface.
180
+ *
181
+ * @param string $class the name of the class
182
+ * @return bool|null true, if loaded
183
+ */
184
+ public function loadClass($class) {
185
+ if ($file = $this->findFile($class)) {
186
+ include $file;
187
+ return true;
188
+ }
189
+ }
190
+
191
+ /**
192
+ * Finds the path to the file where the class is defined.
193
+ *
194
+ * @param string $class the name of the class
195
+ * @return string|null the path, if found
196
+ */
197
+ public function findFile($class) {
198
+ if ('\\' === $class[0]) {
199
+ $class = substr($class, 1);
200
+ }
201
+
202
+ if (isset($this->classMap[$class])) {
203
+ return $this->classMap[$class];
204
+ }
205
+ elseif ($this->classMapAuthoratative) {
206
+ return false;
207
+ }
208
+
209
+ $classPath = $this->getClassPath($class);
210
+
211
+ foreach ($this->prefixes as $prefix => $dirs) {
212
+ if (0 === strpos($class, $prefix)) {
213
+ foreach ($dirs as $dir) {
214
+ if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
215
+ return $dir.DIRECTORY_SEPARATOR.$classPath;
216
+ }
217
+ }
218
+ }
219
+ }
220
+
221
+ foreach ($this->fallbackDirs as $dir) {
222
+ if (file_exists($dir.DIRECTORY_SEPARATOR.$classPath)) {
223
+ return $dir.DIRECTORY_SEPARATOR.$classPath;
224
+ }
225
+ }
226
+
227
+ if ($this->useIncludePath && $file = self::resolveIncludePath($classPath)) {
228
+ return $file;
229
+ }
230
+
231
+ return $this->classMap[$class] = false;
232
+ }
233
+
234
+ private function getClassPath($class) {
235
+ if (false !== $pos = strrpos($class, '\\')) {
236
+ // namespaced class name
237
+ $classPath = str_replace('\\', DIRECTORY_SEPARATOR, substr($class, 0, $pos)).DIRECTORY_SEPARATOR;
238
+ $className = substr($class, $pos + 1);
239
+ }
240
+ else {
241
+ // PEAR-like class name
242
+ $classPath = null;
243
+ $className = $class;
244
+ }
245
+
246
+ $className = str_replace('_', DIRECTORY_SEPARATOR, $className);
247
+
248
+ // restore the prefix
249
+ if ($this->allowUnderscore && DIRECTORY_SEPARATOR === $className[0]) {
250
+ $className[0] = '_';
251
+ }
252
+
253
+ $classPath .= $className.'.php';
254
+
255
+ return $classPath;
256
+ }
257
+
258
+ public static function resolveIncludePath($classPath) {
259
+ $paths = explode(PATH_SEPARATOR, get_include_path());
260
+
261
+ foreach ($paths as $path) {
262
+ $path = rtrim($path, '/\\');
263
+
264
+ if ($file = file_exists($path.DIRECTORY_SEPARATOR.$file)) {
265
+ return $file;
266
+ }
267
+ }
268
+
269
+ return false;
270
+ }
271
+ }
vendor/composer/autoload_classmap.php ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_classmap.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ 'RP4WP' => $baseDir . '/classes/class-rp4wp.php',
10
+ 'RP4WP_Cap_Manager' => $baseDir . '/classes/class-cap-manager.php',
11
+ 'RP4WP_Class_Manager' => $baseDir . '/classes/class-class-manager.php',
12
+ 'RP4WP_Constants' => $baseDir . '/classes/class-constants.php',
13
+ 'RP4WP_Filter' => $baseDir . '/classes/filters/class-filter.php',
14
+ 'RP4WP_Filter_After_Post' => $baseDir . '/classes/filters/class-filter-after-post.php',
15
+ 'RP4WP_Filter_Plugin_Links' => $baseDir . '/classes/filters/class-filter-plugin-links.php',
16
+ 'RP4WP_Filter_Set_Screen_Option' => $baseDir . '/classes/filters/class-filter-set-screen-option.php',
17
+ 'RP4WP_Hook' => $baseDir . '/classes/hooks/class-hook.php',
18
+ 'RP4WP_Hook_Admin_Scripts' => $baseDir . '/classes/hooks/class-hook-admin-scripts.php',
19
+ 'RP4WP_Hook_Ajax_Delete_Link' => $baseDir . '/classes/hooks/class-hook-ajax-delete-link.php',
20
+ 'RP4WP_Hook_Ajax_Install_Link_Posts' => $baseDir . '/classes/hooks/class-hook-ajax-install-link-posts.php',
21
+ 'RP4WP_Hook_Ajax_Install_Save_Words' => $baseDir . '/classes/hooks/class-hook-ajax-install-save-words.php',
22
+ 'RP4WP_Hook_Delete_Words' => $baseDir . '/classes/hooks/class-hook-delete-words.php',
23
+ 'RP4WP_Hook_Frontend_Css' => $baseDir . '/classes/hooks/class-hook-frontend-css.php',
24
+ 'RP4WP_Hook_Link_Related_Screen' => $baseDir . '/classes/hooks/class-hook-link-related-screen.php',
25
+ 'RP4WP_Hook_Meta_Box' => $baseDir . '/classes/hooks/class-hook-meta-box.php',
26
+ 'RP4WP_Hook_Meta_Box_Ajax_Sort' => $baseDir . '/classes/hooks/class-hook-meta-box-ajax-sort.php',
27
+ 'RP4WP_Hook_Page_Install' => $baseDir . '/classes/hooks/class-hook-page-install.php',
28
+ 'RP4WP_Hook_Post_Type' => $baseDir . '/classes/hooks/class-hook-post-type.php',
29
+ 'RP4WP_Hook_Related_Auto_Link' => $baseDir . '/classes/hooks/class-hook-related-auto-link.php',
30
+ 'RP4WP_Hook_Related_Save_Words' => $baseDir . '/classes/hooks/class-hook-related-save-words.php',
31
+ 'RP4WP_Hook_Settings_Page' => $baseDir . '/classes/hooks/class-hook-settings-page.php',
32
+ 'RP4WP_Hook_Shortcode' => $baseDir . '/classes/hooks/class-hook-shortcode.php',
33
+ 'RP4WP_Hook_Widget' => $baseDir . '/classes/hooks/class-hook-widget.php',
34
+ 'RP4WP_Is_Installing_Notice' => $baseDir . '/classes/class-is-installing-notice.php',
35
+ 'RP4WP_Javascript_Strings' => $baseDir . '/classes/class-javascript-strings.php',
36
+ 'RP4WP_Link_Related_Table' => $baseDir . '/classes/class-link-related-table.php',
37
+ 'RP4WP_Manager_Filter' => $baseDir . '/classes/class-manager-filter.php',
38
+ 'RP4WP_Manager_Hook' => $baseDir . '/classes/class-manager-hook.php',
39
+ 'RP4WP_Meta_Box_Manage' => $baseDir . '/classes/meta-boxes/class-meta-box-manage.php',
40
+ 'RP4WP_Multisite_Notice' => $baseDir . '/classes/class-multisite-notice.php',
41
+ 'RP4WP_Nag_Manager' => $baseDir . '/classes/class-nag-manager.php',
42
+ 'RP4WP_Post_Link_Manager' => $baseDir . '/classes/class-post-link-manager.php',
43
+ 'RP4WP_Related_Post_Manager' => $baseDir . '/classes/class-related-post-manager.php',
44
+ 'RP4WP_Related_Posts_Widget' => $baseDir . '/classes/class-related-posts-widget.php',
45
+ 'RP4WP_Related_Word_Manager' => $baseDir . '/classes/class-related-word-manager.php',
46
+ 'RP4WP_Settings' => $baseDir . '/classes/settings/class-settings.php',
47
+ );
vendor/composer/autoload_namespaces.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_namespaces.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ 'xrstf\\Composer52' => array($vendorDir . '/xrstf/composer-php52/lib'),
10
+ );
vendor/composer/autoload_psr4.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_psr4.php @generated by Composer
4
+
5
+ $vendorDir = dirname(dirname(__FILE__));
6
+ $baseDir = dirname($vendorDir);
7
+
8
+ return array(
9
+ );
vendor/composer/autoload_real.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_real.php @generated by Composer
4
+
5
+ class ComposerAutoloaderInit26c472e17f80ae54ffe27bb18257c99f
6
+ {
7
+ private static $loader;
8
+
9
+ public static function loadClassLoader($class)
10
+ {
11
+ if ('Composer\Autoload\ClassLoader' === $class) {
12
+ require __DIR__ . '/ClassLoader.php';
13
+ }
14
+ }
15
+
16
+ public static function getLoader()
17
+ {
18
+ if (null !== self::$loader) {
19
+ return self::$loader;
20
+ }
21
+
22
+ spl_autoload_register(array('ComposerAutoloaderInit26c472e17f80ae54ffe27bb18257c99f', 'loadClassLoader'), true, true);
23
+ self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit26c472e17f80ae54ffe27bb18257c99f', 'loadClassLoader'));
25
+
26
+ $map = require __DIR__ . '/autoload_namespaces.php';
27
+ foreach ($map as $namespace => $path) {
28
+ $loader->set($namespace, $path);
29
+ }
30
+
31
+ $map = require __DIR__ . '/autoload_psr4.php';
32
+ foreach ($map as $namespace => $path) {
33
+ $loader->setPsr4($namespace, $path);
34
+ }
35
+
36
+ $classMap = require __DIR__ . '/autoload_classmap.php';
37
+ if ($classMap) {
38
+ $loader->addClassMap($classMap);
39
+ }
40
+
41
+ $loader->register(true);
42
+
43
+ return $loader;
44
+ }
45
+ }
46
+
47
+ function composerRequire26c472e17f80ae54ffe27bb18257c99f($file)
48
+ {
49
+ require $file;
50
+ }
vendor/composer/autoload_real_52.php ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // autoload_real_52.php generated by xrstf/composer-php52
4
+
5
+ class ComposerAutoloaderInit0c9c1396e7a1bddfc908f1432cae5da0 {
6
+ private static $loader;
7
+
8
+ public static function loadClassLoader($class) {
9
+ if ('xrstf_Composer52_ClassLoader' === $class) {
10
+ require dirname(__FILE__).'/ClassLoader52.php';
11
+ }
12
+ }
13
+
14
+ /**
15
+ * @return xrstf_Composer52_ClassLoader
16
+ */
17
+ public static function getLoader() {
18
+ if (null !== self::$loader) {
19
+ return self::$loader;
20
+ }
21
+
22
+ spl_autoload_register(array('ComposerAutoloaderInit0c9c1396e7a1bddfc908f1432cae5da0', 'loadClassLoader'), true /*, true */);
23
+ self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit0c9c1396e7a1bddfc908f1432cae5da0', 'loadClassLoader'));
25
+
26
+ $vendorDir = dirname(dirname(__FILE__));
27
+ $baseDir = dirname($vendorDir);
28
+ $dir = dirname(__FILE__);
29
+
30
+ $map = require $dir.'/autoload_namespaces.php';
31
+ foreach ($map as $namespace => $path) {
32
+ $loader->add($namespace, $path);
33
+ }
34
+
35
+ $classMap = require $dir.'/autoload_classmap.php';
36
+ if ($classMap) {
37
+ $loader->addClassMap($classMap);
38
+ }
39
+
40
+ $loader->register(true);
41
+
42
+ return $loader;
43
+ }
44
+ }