Related Posts for WordPress - Version 1.3.0

Version Description

: August 18, 2014 = * Added 'rp4wp_children' template function. * Added shortcode [rp4wp] * Added pot translation template file. * Added Dutch translation. * Added review request admin notice.

Download this release

Release Info

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

Code changes from version 1.2.2 to 1.3.0

classes/class-constants.php CHANGED
@@ -20,4 +20,9 @@ abstract class RP4WP_Constants {
20
  // Options
21
  const OPTION_DO_INSTALL = 'rp4wp_do_install';
22
 
 
 
 
 
 
23
  }
20
  // Options
21
  const OPTION_DO_INSTALL = 'rp4wp_do_install';
22
 
23
+ // Nag options
24
+ const OPTION_INSTALL_DATE = 'rp4wp-install-date';
25
+ const OPTION_ADMIN_NOTICE_KEY = 'rp4wp-hide-nag';
26
+
27
+
28
  }
classes/class-nag-manager.php ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ if ( !class_exists( 'RP4WP_Nag_Manager' ) ) {
8
+ class RP4WP_Nag_Manager {
9
+
10
+ /**
11
+ * Get the admin query string
12
+ *
13
+ * @since 1.3.0
14
+ * @access public
15
+ *
16
+ * @return mixed
17
+ */
18
+ private function get_admin_query_string_array() {
19
+ parse_str( $_SERVER['QUERY_STRING'], $params );
20
+
21
+ return $params;
22
+ }
23
+
24
+ /**
25
+ * Insert the install date
26
+ *
27
+ * @since 1.3.0
28
+ * @access public
29
+ *
30
+ * @return string
31
+ */
32
+ private function insert_install_date() {
33
+ $datetime_now = new DateTime();
34
+ $date_string = $datetime_now->format( 'Y-m-d' );
35
+ add_site_option( RP4WP_Constants::OPTION_INSTALL_DATE, $date_string, '', 'no' );
36
+
37
+ return $date_string;
38
+ }
39
+
40
+ /**
41
+ * get the install date
42
+ *
43
+ * @since 1.3.0
44
+ * @access private
45
+ *
46
+ * @return DateTime
47
+ */
48
+ private function get_install_date() {
49
+ $date_string = get_site_option( RP4WP_Constants::OPTION_INSTALL_DATE, '' );
50
+ if ( $date_string == '' ) {
51
+ // There is no install date, plugin was installed before version 1.2.0. Add it now.
52
+ $date_string = $this->insert_install_date();
53
+ }
54
+
55
+ return new DateTime( $date_string );
56
+ }
57
+
58
+ /**
59
+ * Setup the nag manager
60
+ *
61
+ * @since 1.3.0
62
+ * @access public
63
+ *
64
+ * @return bool
65
+ */
66
+ public function setup() {
67
+
68
+ // Check user rights
69
+ if ( current_user_can( 'install_plugins' ) ) {
70
+
71
+ // Get current user
72
+ $current_user = wp_get_current_user();
73
+
74
+ // Get user meta
75
+ $hide_notice = get_user_meta( $current_user->ID, RP4WP_Constants::OPTION_ADMIN_NOTICE_KEY, true );
76
+
77
+ // Check if the notice is already dismissed
78
+ if ( '' == $hide_notice ) {
79
+ // Get installation date
80
+ $datetime_install = $this->get_install_date();
81
+ $datetime_past = new DateTime( '-10 days' );
82
+
83
+ if ( $datetime_past >= $datetime_install ) {
84
+ // 10 or more days ago, show admin notice
85
+ add_action( 'admin_notices', array( $this, 'display_admin_notice' ) );
86
+ }
87
+ }
88
+
89
+ // Catch the hide notice
90
+ $this->catch_hide_notice();
91
+ }
92
+ }
93
+
94
+ /**
95
+ * Display the admin notice
96
+ *
97
+ * @since 1.3.0
98
+ * @access public
99
+ */
100
+ public function display_admin_notice() {
101
+ $query_params = $this->get_admin_query_string_array();
102
+ $query_string = '?' . http_build_query( array_merge( $query_params, array( RP4WP_Constants::OPTION_ADMIN_NOTICE_KEY => '1' ) ) );
103
+
104
+ echo '<div class="updated"><p>';
105
+ printf( __( "You've been using %sRelated Posts for WordPress%s for some time now, could you please give it a review at wordpress.org?" ), '<b>', '</b>' );
106
+ echo "<br /><br />";
107
+ printf( __( "%sYes, take me there!%s - %sI've already done this!%s" ), '<a href="http://wordpress.org/support/view/plugin-reviews/related-posts-for-wp" target="_blank">', '</a>', '<a href="' . $query_string . '">', '</a>' );
108
+ echo "</p></div>";
109
+ }
110
+
111
+ /**
112
+ * Catch the hide notice click
113
+ *
114
+ * @since 1.0.0
115
+ * @access public
116
+ */
117
+ public function catch_hide_notice() {
118
+ if ( isset( $_GET[RP4WP_Constants::OPTION_ADMIN_NOTICE_KEY] ) && current_user_can( 'install_plugins' ) ) {
119
+ // Add user meta
120
+ global $current_user;
121
+ add_user_meta( $current_user->ID, RP4WP_Constants::OPTION_ADMIN_NOTICE_KEY, '1', true );
122
+
123
+ // Build redirect URL
124
+ $query_params = $this->get_admin_query_string_array();
125
+ unset( $query_params[RP4WP_Constants::OPTION_ADMIN_NOTICE_KEY] );
126
+ $query_string = http_build_query( $query_params );
127
+ if ( $query_string != '' ) {
128
+ $query_string = '?' . $query_string;
129
+ }
130
+
131
+ $redirect_url = 'http';
132
+ if ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] == 'on' ) {
133
+ $redirect_url .= 's';
134
+ }
135
+ $redirect_url .= '://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . $query_string;
136
+
137
+ // Redirect
138
+ wp_redirect( $redirect_url );
139
+ exit;
140
+ }
141
+ }
142
+
143
+ }
144
+ }
classes/class-post-link-manager.php CHANGED
@@ -273,4 +273,98 @@ class RP4WP_Post_Link_Manager {
273
  endwhile;
274
  }
275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  }
273
  endwhile;
274
  }
275
 
276
+ /**
277
+ * Generate the children list
278
+ *
279
+ * @param $id
280
+ *
281
+ * @since 1.0.0
282
+ * @access public
283
+ *
284
+ * @return string
285
+ */
286
+ public function generate_children_list( $id ) {
287
+
288
+ // The content
289
+ $content = '';
290
+
291
+ // Get the children
292
+ $related_posts = $this->get_children( $id );
293
+
294
+ // Count
295
+ if ( count( $related_posts ) > 0 ) {
296
+
297
+ // The rp4wp block
298
+ $content .= "<div class='rp4wp-related-posts'>\n";
299
+
300
+ // Get the heading text
301
+ $heading_text = RP4WP::get()->settings->get_option( 'heading_text' );
302
+
303
+ // Check if there is a heading text
304
+ if ( '' != $heading_text ) {
305
+
306
+ // Add heading text plus heading elements
307
+ $heading_text = '<h3>' . $heading_text . '</h3>' . PHP_EOL;
308
+ }
309
+
310
+ // Filter complete heading
311
+ $content .= apply_filters( 'rp4wp_heading', $heading_text );
312
+
313
+ // Open the list
314
+ $content .= "<ul>\n";
315
+
316
+
317
+ foreach ( $related_posts as $rp4wp_post ) {
318
+
319
+ // Setup the postdata
320
+ setup_postdata( $rp4wp_post );
321
+
322
+ // Output the linked post
323
+ $content .= "<li>";
324
+
325
+ if ( 1 == RP4WP::get()->settings->get_option( 'display_image' ) ) {
326
+ if ( has_post_thumbnail( $rp4wp_post->ID ) ) {
327
+
328
+ /**
329
+ * Filter: 'rp4wp_apdc_thumbnail_size' - Allows changing the thumbnail size of the thumbnail in de APDC section
330
+ *
331
+ * @api String $thumbnail_size The current/default thumbnail size.
332
+ */
333
+ $thumb_size = apply_filters( 'rp4wp_thumbnail_size', 'post-thumbnail' );
334
+
335
+ $content .= "<div class='rp4wp-related-post-image'>" . PHP_EOL;
336
+ $content .= "<a href='" . get_permalink( $rp4wp_post->ID ) . "'>";
337
+ $content .= get_the_post_thumbnail( $rp4wp_post->ID, $thumb_size );
338
+ $content .= "</a>";
339
+ $content .= "</div>" . PHP_EOL;
340
+ }
341
+ }
342
+
343
+ $content .= "<div class='rp4wp-related-post-content'>" . PHP_EOL;
344
+ $content .= "<a href='" . get_permalink( $rp4wp_post->ID ) . "'>" . $rp4wp_post->post_title . "</a>";
345
+
346
+ $excerpt_length = RP4WP::get()->settings->get_option( 'excerpt_length' );
347
+ if ( $excerpt_length > 0 ) {
348
+ $excerpt = ( ( '' != $rp4wp_post->post_excerpt ) ? $rp4wp_post->post_excerpt : wp_trim_words( $rp4wp_post->post_content, $excerpt_length ) );
349
+ $content .= "<p>" . $excerpt . "</p>";
350
+ }
351
+
352
+ $content .= "</div>" . PHP_EOL;
353
+
354
+ $content .= "</li>\n";
355
+
356
+ // Reset the postdata
357
+ wp_reset_postdata();
358
+ }
359
+
360
+ // Close the wrapper div
361
+ $content .= "</ul>\n";
362
+ $content .= "</div>\n";
363
+
364
+ }
365
+
366
+ return $content;
367
+
368
+ }
369
+
370
  }
classes/class-settings.php CHANGED
@@ -59,7 +59,7 @@ class RP4WP_Settings {
59
  'fields' => array(
60
  array(
61
  'id' => 'heading_text',
62
- 'label' => __( 'Heading text ', 'related-posts-for-wp' ),
63
  'description' => __( 'The text that is displayed above the related posts. To disable, leave field empty.', 'related-posts-for-wp' ),
64
  'type' => 'text',
65
  'default' => 'Related Posts',
59
  'fields' => array(
60
  array(
61
  'id' => 'heading_text',
62
+ 'label' => __( 'Heading text', 'related-posts-for-wp' ),
63
  'description' => __( 'The text that is displayed above the related posts. To disable, leave field empty.', 'related-posts-for-wp' ),
64
  'type' => 'text',
65
  'default' => 'Related Posts',
classes/filters/class-filter-after-post.php CHANGED
@@ -31,81 +31,10 @@ class RP4WP_Filter_After_Post extends RP4WP_Filter {
31
  // Post Link Manager
32
  $pl_manager = new RP4WP_Post_Link_Manager();
33
 
34
- // Get the linked posts
35
- $related_posts = $pl_manager->get_children( $id );
36
-
37
- // Count
38
- if ( count( $related_posts ) > 0 ) {
39
-
40
- // The rp4wp block
41
- $content .= "<div class='rp4wp-related-posts'>\n";
42
-
43
- // Get the heading text
44
- $heading_text = RP4WP::get()->settings->get_option( 'heading_text' );
45
-
46
- // Check if there is a heading text
47
- if ( '' != $heading_text ) {
48
-
49
- // Add heading text plus heading elements
50
- $heading_text = '<h3>' . $heading_text . '</h3>' . PHP_EOL;
51
- }
52
-
53
- // Filter complete heading
54
- $content .= apply_filters( 'rp4wp_heading', $heading_text );
55
-
56
- // Open the list
57
- $content .= "<ul>\n";
58
-
59
-
60
- foreach ( $related_posts as $rp4wp_post ) {
61
-
62
- // Setup the postdata
63
- setup_postdata( $rp4wp_post );
64
-
65
- // Output the linked post
66
- $content .= "<li>";
67
-
68
- if ( 1 == RP4WP::get()->settings->get_option( 'display_image' ) ) {
69
- if ( has_post_thumbnail( $rp4wp_post->ID ) ) {
70
-
71
- /**
72
- * Filter: 'rp4wp_apdc_thumbnail_size' - Allows changing the thumbnail size of the thumbnail in de APDC section
73
- *
74
- * @api String $thumbnail_size The current/default thumbnail size.
75
- */
76
- $thumb_size = apply_filters( 'rp4wp_thumbnail_size', 'post-thumbnail' );
77
-
78
- $content .= "<div class='rp4wp-related-post-image'>" . PHP_EOL;
79
- $content .= "<a href='" . get_permalink( $rp4wp_post->ID ) . "'>";
80
- $content .= get_the_post_thumbnail( $rp4wp_post->ID, $thumb_size );
81
- $content .= "</a>";
82
- $content .= "</div>" . PHP_EOL;
83
- }
84
- }
85
-
86
- $content .= "<div class='rp4wp-related-post-content'>" . PHP_EOL;
87
- $content .= "<a href='" . get_permalink( $rp4wp_post->ID ) . "'>" . $rp4wp_post->post_title . "</a>";
88
-
89
- $excerpt_length = RP4WP::get()->settings->get_option( 'excerpt_length' );
90
- if ( $excerpt_length > 0 ) {
91
- $excerpt = ( ( '' != $rp4wp_post->post_excerpt ) ? $rp4wp_post->post_excerpt : wp_trim_words( $rp4wp_post->post_content, $excerpt_length ) );
92
- $content .= "<p>" . $excerpt . "</p>";
93
- }
94
-
95
- $content .= "</div>" . PHP_EOL;
96
-
97
- $content .= "</li>\n";
98
-
99
- // Reset the postdata
100
- wp_reset_postdata();
101
- }
102
-
103
- // Close the wrapper div
104
- $content .= "</ul>\n";
105
- $content .= "</div>\n";
106
-
107
- }
108
 
 
109
  return $content;
110
  }
111
  }
31
  // Post Link Manager
32
  $pl_manager = new RP4WP_Post_Link_Manager();
33
 
34
+ // Generate the content
35
+ $content .= $pl_manager->generate_children_list( $id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
+ // Return content
38
  return $content;
39
  }
40
  }
classes/hooks/class-hook-shortcode.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ } // Exit if accessed directly
6
+
7
+ class RP4WP_Hook_Shortcode extends RP4WP_Hook {
8
+ protected $tag = 'init';
9
+
10
+ public function run() {
11
+ add_shortcode( 'rp4wp', array( $this, 'output' ) );
12
+ }
13
+
14
+ /**
15
+ * Output the shortcode
16
+ *
17
+ * @since 1.3.0
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
+ echo $pl_manager->generate_children_list( $id );
30
+ }
31
+ }
includes/template-functions.php ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( !function_exists( 'rp4wp_children' ) ) {
4
+ /**
5
+ * Generate the Related Posts for WordPress children list
6
+ *
7
+ * @param bool $id
8
+ * @param bool $output
9
+ *
10
+ * @since 1.0.0
11
+ * @access public
12
+ *
13
+ * @return string
14
+ */
15
+ function rp4wp_children( $id = false, $output = true ) {
16
+
17
+ // Get the current ID if ID not set
18
+ if ( false === $id ) {
19
+ $id = get_the_ID();
20
+ }
21
+
22
+ // Post Link Manager
23
+ $pl_manager = new RP4WP_Post_Link_Manager();
24
+
25
+ // Generate the children list
26
+ $content = $pl_manager->generate_children_list( $id );
27
+
28
+ // Output or return the content
29
+ if ( $output ) {
30
+ echo $content;
31
+ } else {
32
+ return $content;
33
+ }
34
+
35
+ }
36
+ }
37
+
languages/related-posts-for-wp-nl_NL.mo ADDED
Binary file
languages/related-posts-for-wp-nl_NL.po ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Related Posts for WordPress\n"
4
+ "POT-Creation-Date: 2014-08-17 23:35+0100\n"
5
+ "PO-Revision-Date: 2014-08-17 23:35+0100\n"
6
+ "Last-Translator: Barry Kooij <barry@cageworks.nl>\n"
7
+ "Language-Team: Cageworks <barry@cageworks.nl>\n"
8
+ "Language: en\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.7\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-KeywordsList: _e;__;_x\n"
17
+ "X-Poedit-SearchPath-0: ../.\n"
18
+
19
+ #: .././classes/class-link-related-table.php:47
20
+ #: .././classes/hooks/class-hook-settings-page.php:17
21
+ #: .././classes/meta-boxes/class-meta-box-manage.php:32
22
+ msgid "Related Posts"
23
+ msgstr "Gerelateerde Berichten"
24
+
25
+ #: .././classes/class-link-related-table.php:48
26
+ msgid "All Posts"
27
+ msgstr "Alle Berichten"
28
+
29
+ #: .././classes/class-link-related-table.php:97
30
+ msgid "Title"
31
+ msgstr "Titel"
32
+
33
+ #: .././classes/class-link-related-table.php:224
34
+ msgid "Link Post"
35
+ msgstr "Link Bericht"
36
+
37
+ #: .././classes/class-link-related-table.php:256
38
+ msgid "Link Posts"
39
+ msgstr "Link Berichten"
40
+
41
+ #: .././classes/class-settings.php:37
42
+ msgid "Automatic post linking"
43
+ msgstr "Automatisch linken van berichten"
44
+
45
+ #: .././classes/class-settings.php:38
46
+ msgid "This section contains automatic post link related settings."
47
+ msgstr "Dit gedeelte bevat instellingen van de automatisch gelinkte berichten."
48
+
49
+ #: .././classes/class-settings.php:42
50
+ msgid "Enable"
51
+ msgstr "Activeren"
52
+
53
+ #: .././classes/class-settings.php:43
54
+ msgid "Checking this will enable automatically linking posts to new posts"
55
+ msgstr ""
56
+ "Door dit aan te vinken zullen berichten automatisch gekoppeld worden aan "
57
+ "nieuwe berichten"
58
+
59
+ #: .././classes/class-settings.php:49
60
+ msgid "Amount of Posts"
61
+ msgstr "Aantal berichten"
62
+
63
+ #: .././classes/class-settings.php:50
64
+ msgid "The amount of automatically linked post"
65
+ msgstr "Het aantal automatisch gelinkte berichten"
66
+
67
+ #: .././classes/class-settings.php:57
68
+ msgid "Frontend Settings"
69
+ msgstr "Frontend Instellingen"
70
+
71
+ #: .././classes/class-settings.php:58
72
+ msgid "This section contains frontend related settings."
73
+ msgstr "Dit gedeelte bevat frontend gerelateerde instellingen."
74
+
75
+ #: .././classes/class-settings.php:62
76
+ msgid "Heading text"
77
+ msgstr "Titel tekst"
78
+
79
+ #: .././classes/class-settings.php:63
80
+ msgid ""
81
+ "The text that is displayed above the related posts. To disable, leave field "
82
+ "empty."
83
+ msgstr ""
84
+ "De tekst welke boven de gerelateerde berichten getoond wordt. Laat dit veld "
85
+ "leeg om het uit te schakelen."
86
+
87
+ #: .././classes/class-settings.php:69
88
+ msgid "Excerpt length"
89
+ msgstr "Samenvatting lengte"
90
+
91
+ #: .././classes/class-settings.php:70
92
+ msgid ""
93
+ "The amount of words to be displayed below the title on website. To disable, "
94
+ "set value to 0."
95
+ msgstr ""
96
+ "Het aantal woorden dat getoond wordt onder de titel. Vul 0 in om het uit te "
97
+ "schakelen."
98
+
99
+ #: .././classes/class-settings.php:76
100
+ msgid "Display Image"
101
+ msgstr "Toon afbeelding"
102
+
103
+ #: .././classes/class-settings.php:77
104
+ msgid "Checking this will enable displaying featured images of related posts."
105
+ msgstr ""
106
+ "Door dit aan te vinken zullen afbeeldingen van berichten getoond worden."
107
+
108
+ #: .././classes/class-settings.php:83
109
+ msgid "CSS"
110
+ msgstr "CSS"
111
+
112
+ #: .././classes/class-settings.php:84
113
+ msgid ""
114
+ "Warning! This is an advanced feature! An error here will break frontend "
115
+ "display. To disable, leave field empty."
116
+ msgstr ""
117
+ "Waarschuwing! Dit is een geavanceerde functie! Een fout hier kan uw website "
118
+ "incorrect laten tonen. Laat dit veld leeg om deze functie uit te schakelen."
119
+
120
+ #: .././classes/hooks/class-hook-link-related-screen.php:131
121
+ msgid "Posts"
122
+ msgstr "Berichten"
123
+
124
+ #: .././classes/hooks/class-hook-link-related-screen.php:132
125
+ msgid "Cancel linking"
126
+ msgstr "Annuleer linken"
127
+
128
+ #: .././classes/hooks/class-hook-link-related-screen.php:148
129
+ msgid "Search"
130
+ msgstr "Zoeken"
131
+
132
+ #: .././classes/hooks/class-hook-page-install.php:45
133
+ msgid "Related Posts for WordPress Installation"
134
+ msgstr "Related Posts for WordPress installatie"
135
+
136
+ #: .././classes/hooks/class-hook-settings-page.php:50
137
+ msgid "Plugin version"
138
+ msgstr "Plugin versie"
139
+
140
+ #: .././classes/hooks/class-hook-settings-page.php:54
141
+ msgid "More information"
142
+ msgstr "Meer informatie"
143
+
144
+ #: .././classes/hooks/class-hook-settings-page.php:56
145
+ #, php-format
146
+ msgid "<a href='%s'>FAQ</a>"
147
+ msgstr "<a href='%s'>FAQ</a>"
148
+
149
+ #: .././classes/hooks/class-hook-settings-page.php:58
150
+ #, php-format
151
+ msgid "<a href='%s'>Change log</a>"
152
+ msgstr "<a href='%s'>Change log</a>"
153
+
154
+ #: .././classes/hooks/class-hook-settings-page.php:60
155
+ #, php-format
156
+ msgid "<a href='%s'>Give us a review</a>"
157
+ msgstr "<a href='%s'>Geef ons een review</a>"
158
+
159
+ #: .././classes/hooks/class-hook-settings-page.php:62
160
+ #, php-format
161
+ msgid "<a href='%s'>Release blog post</a>"
162
+ msgstr "<a href='%s'>Release blog bericht</a>"
163
+
164
+ #: .././classes/hooks/class-hook-settings-page.php:66
165
+ msgid "About the developer"
166
+ msgstr "Over de ontwikkelaar"
167
+
168
+ #: .././classes/hooks/class-hook-settings-page.php:68
169
+ msgid ""
170
+ "Barry is a WordPress developer that works on WooCommerce by WooThemes and is "
171
+ "the author of various WordPress plugins that include Post Connector, Related "
172
+ "Posts for WordPress and What The File."
173
+ msgstr ""
174
+ "Barry is een WordPress ontwikkelaar werkzaam bij WooThemes waar hij werkt "
175
+ "aan WooCommerce. Ook is hij de schrijver van verschillende WordPress plugins "
176
+ "zoals Post Connector, Related Posts for WordPress en What The File."
177
+
178
+ #: .././classes/hooks/class-hook-settings-page.php:70
179
+ msgid ""
180
+ "Barry likes contributing to opensource projects and visiting WordCamps and "
181
+ "WordPress meetups. He’s the organizer of the WordPress meetup in Tilburg."
182
+ msgstr ""
183
+ "Barry houd van het bijdragen aan opensource projecten en het bezoeken van "
184
+ "WordCamps en WordPress meetups. Hij is de organisator van de WordPress "
185
+ "meetup in Tilburg."
186
+
187
+ #: .././classes/hooks/class-hook-settings-page.php:72
188
+ #, php-format
189
+ msgid "You can follow Barry on Twitter <a href='%s'>here</a>."
190
+ msgstr "<a href='%s'>Volg Barry op Twitter</a>."
191
+
192
+ #: .././classes/meta-boxes/class-meta-box-manage.php:75
193
+ msgid "Add Related Posts"
194
+ msgstr "Voeg gerelateerde posts toe"
195
+
196
+ #: .././classes/meta-boxes/class-meta-box-manage.php:98
197
+ msgid "Edit this item"
198
+ msgstr "Bewerk dit item"
199
+
200
+ #: .././classes/meta-boxes/class-meta-box-manage.php:99
201
+ msgid "Edit Post"
202
+ msgstr "Bewerk Bericht"
203
+
204
+ #: .././classes/meta-boxes/class-meta-box-manage.php:101
205
+ msgid "Delete this item"
206
+ msgstr "Verwijder dit item"
207
+
208
+ #: .././classes/meta-boxes/class-meta-box-manage.php:102
209
+ msgid "Delete Post"
210
+ msgstr "Verwijder Bericht"
211
+
212
+ #: .././classes/meta-boxes/class-meta-box-manage.php:115
213
+ msgid "No related posts found."
214
+ msgstr "Geen gerelateerde berichten gevonden."
215
+
216
+ #: .././node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:3
217
+ #: .././node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:5
218
+ #: .././node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:4
219
+ #: .././node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:6
220
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:3
221
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:5
222
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:3
223
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:5
224
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:3
225
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:5
226
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:3
227
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:5
228
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:4
229
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:6
230
+ msgid "Hello World"
231
+ msgstr "Hallo Wereld"
232
+
233
+ #: .././node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:4
234
+ #: .././node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:5
235
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:4
236
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:4
237
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:4
238
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:4
239
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:5
240
+ msgid "Post"
241
+ msgstr "Bericht"
242
+
243
+ #: .././node_modules/grunt-wp-i18n/test/fixtures/basic-theme/exclude/file.php:3
244
+ #: .././node_modules/grunt-wp-i18n/test/fixtures/plugin-include/plugin-include.php:6
245
+ msgid "Exclude"
246
+ msgstr "Uitsluiten"
247
+
248
+ #: .././node_modules/grunt-wp-i18n/test/fixtures/plugin-include/include/file.php:2
249
+ msgid "Include"
250
+ msgstr "Insluiten"
251
+
252
+ #: .././node_modules/grunt-wp-i18n/test/fixtures/text-domains/add-domain.php:2
253
+ #: .././node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-domains.php:2
254
+ #: .././node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-domains.php:3
255
+ msgid "String"
256
+ msgstr "String"
languages/related-posts-for-wp.pot ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Related Posts for WordPress\n"
4
+ "POT-Creation-Date: 2014-08-17 23:35+0100\n"
5
+ "PO-Revision-Date: 2014-08-17 23:35+0100\n"
6
+ "Last-Translator: Barry Kooij <barry@cageworks.nl>\n"
7
+ "Language-Team: Cageworks <barry@cageworks.nl>\n"
8
+ "Language: en\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.7\n"
13
+ "X-Poedit-Basepath: .\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-KeywordsList: _e;__;_x\n"
17
+ "X-Poedit-SearchPath-0: ../.\n"
18
+ "X-Poedit-SearchPathExcluded-0: ../node_modules/.\n"
19
+
20
+ #: .././classes/class-link-related-table.php:47
21
+ #: .././classes/hooks/class-hook-settings-page.php:17
22
+ #: .././classes/meta-boxes/class-meta-box-manage.php:32
23
+ msgid "Related Posts"
24
+ msgstr ""
25
+
26
+ #: .././classes/class-link-related-table.php:48
27
+ msgid "All Posts"
28
+ msgstr ""
29
+
30
+ #: .././classes/class-link-related-table.php:97
31
+ msgid "Title"
32
+ msgstr ""
33
+
34
+ #: .././classes/class-link-related-table.php:224
35
+ msgid "Link Post"
36
+ msgstr ""
37
+
38
+ #: .././classes/class-link-related-table.php:256
39
+ msgid "Link Posts"
40
+ msgstr ""
41
+
42
+ #: .././classes/class-settings.php:37
43
+ msgid "Automatic post linking"
44
+ msgstr ""
45
+
46
+ #: .././classes/class-settings.php:38
47
+ msgid "This section contains automatic post link related settings."
48
+ msgstr ""
49
+
50
+ #: .././classes/class-settings.php:42
51
+ msgid "Enable"
52
+ msgstr ""
53
+
54
+ #: .././classes/class-settings.php:43
55
+ msgid "Checking this will enable automatically linking posts to new posts"
56
+ msgstr ""
57
+
58
+ #: .././classes/class-settings.php:49
59
+ msgid "Amount of Posts"
60
+ msgstr ""
61
+
62
+ #: .././classes/class-settings.php:50
63
+ msgid "The amount of automatically linked post"
64
+ msgstr ""
65
+
66
+ #: .././classes/class-settings.php:57
67
+ msgid "Frontend Settings"
68
+ msgstr ""
69
+
70
+ #: .././classes/class-settings.php:58
71
+ msgid "This section contains frontend related settings."
72
+ msgstr ""
73
+
74
+ #: .././classes/class-settings.php:62
75
+ msgid "Heading text"
76
+ msgstr ""
77
+
78
+ #: .././classes/class-settings.php:63
79
+ msgid ""
80
+ "The text that is displayed above the related posts. To disable, leave field "
81
+ "empty."
82
+ msgstr ""
83
+
84
+ #: .././classes/class-settings.php:69
85
+ msgid "Excerpt length"
86
+ msgstr ""
87
+
88
+ #: .././classes/class-settings.php:70
89
+ msgid ""
90
+ "The amount of words to be displayed below the title on website. To disable, "
91
+ "set value to 0."
92
+ msgstr ""
93
+
94
+ #: .././classes/class-settings.php:76
95
+ msgid "Display Image"
96
+ msgstr ""
97
+
98
+ #: .././classes/class-settings.php:77
99
+ msgid "Checking this will enable displaying featured images of related posts."
100
+ msgstr ""
101
+
102
+ #: .././classes/class-settings.php:83
103
+ msgid "CSS"
104
+ msgstr ""
105
+
106
+ #: .././classes/class-settings.php:84
107
+ msgid ""
108
+ "Warning! This is an advanced feature! An error here will break frontend "
109
+ "display. To disable, leave field empty."
110
+ msgstr ""
111
+
112
+ #: .././classes/hooks/class-hook-link-related-screen.php:131
113
+ msgid "Posts"
114
+ msgstr ""
115
+
116
+ #: .././classes/hooks/class-hook-link-related-screen.php:132
117
+ msgid "Cancel linking"
118
+ msgstr ""
119
+
120
+ #: .././classes/hooks/class-hook-link-related-screen.php:148
121
+ msgid "Search"
122
+ msgstr ""
123
+
124
+ #: .././classes/hooks/class-hook-page-install.php:45
125
+ msgid "Related Posts for WordPress Installation"
126
+ msgstr ""
127
+
128
+ #: .././classes/hooks/class-hook-settings-page.php:50
129
+ msgid "Plugin version"
130
+ msgstr ""
131
+
132
+ #: .././classes/hooks/class-hook-settings-page.php:54
133
+ msgid "More information"
134
+ msgstr ""
135
+
136
+ #: .././classes/hooks/class-hook-settings-page.php:56
137
+ #, php-format
138
+ msgid "<a href='%s'>FAQ</a>"
139
+ msgstr ""
140
+
141
+ #: .././classes/hooks/class-hook-settings-page.php:58
142
+ #, php-format
143
+ msgid "<a href='%s'>Change log</a>"
144
+ msgstr ""
145
+
146
+ #: .././classes/hooks/class-hook-settings-page.php:60
147
+ #, php-format
148
+ msgid "<a href='%s'>Give us a review</a>"
149
+ msgstr ""
150
+
151
+ #: .././classes/hooks/class-hook-settings-page.php:62
152
+ #, php-format
153
+ msgid "<a href='%s'>Release blog post</a>"
154
+ msgstr ""
155
+
156
+ #: .././classes/hooks/class-hook-settings-page.php:66
157
+ msgid "About the developer"
158
+ msgstr ""
159
+
160
+ #: .././classes/hooks/class-hook-settings-page.php:68
161
+ msgid ""
162
+ "Barry is a WordPress developer that works on WooCommerce by WooThemes and is "
163
+ "the author of various WordPress plugins that include Post Connector, Related "
164
+ "Posts for WordPress and What The File."
165
+ msgstr ""
166
+
167
+ #: .././classes/hooks/class-hook-settings-page.php:70
168
+ msgid ""
169
+ "Barry likes contributing to opensource projects and visiting WordCamps and "
170
+ "WordPress meetups. He’s the organizer of the WordPress meetup in Tilburg."
171
+ msgstr ""
172
+
173
+ #: .././classes/hooks/class-hook-settings-page.php:72
174
+ #, php-format
175
+ msgid "You can follow Barry on Twitter <a href='%s'>here</a>."
176
+ msgstr ""
177
+
178
+ #: .././classes/meta-boxes/class-meta-box-manage.php:75
179
+ msgid "Add Related Posts"
180
+ msgstr ""
181
+
182
+ #: .././classes/meta-boxes/class-meta-box-manage.php:98
183
+ msgid "Edit this item"
184
+ msgstr ""
185
+
186
+ #: .././classes/meta-boxes/class-meta-box-manage.php:99
187
+ msgid "Edit Post"
188
+ msgstr ""
189
+
190
+ #: .././classes/meta-boxes/class-meta-box-manage.php:101
191
+ msgid "Delete this item"
192
+ msgstr ""
193
+
194
+ #: .././classes/meta-boxes/class-meta-box-manage.php:102
195
+ msgid "Delete Post"
196
+ msgstr ""
197
+
198
+ #: .././classes/meta-boxes/class-meta-box-manage.php:115
199
+ msgid "No related posts found."
200
+ msgstr ""
201
+
202
+ #: .././node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:3
203
+ #: .././node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:5
204
+ #: .././node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:4
205
+ #: .././node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:6
206
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:3
207
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:5
208
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:3
209
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:5
210
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:3
211
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:5
212
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:3
213
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:5
214
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:4
215
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:6
216
+ msgid "Hello World"
217
+ msgstr ""
218
+
219
+ #: .././node_modules/grunt-checktextdomain/test/expected/incorrect-domain-autocorrect.php:4
220
+ #: .././node_modules/grunt-checktextdomain/test/expected/variable-domain-autocorrect.php:5
221
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/correct-domain.php:4
222
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain-autocorrect.php:4
223
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/incorrect-domain.php:4
224
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/missing-domain.php:4
225
+ #: .././node_modules/grunt-checktextdomain/test/fixtures/variable-domain-autocorrect.php:5
226
+ msgid "Post"
227
+ msgstr ""
228
+
229
+ #: .././node_modules/grunt-wp-i18n/test/fixtures/basic-theme/exclude/file.php:3
230
+ #: .././node_modules/grunt-wp-i18n/test/fixtures/plugin-include/plugin-include.php:6
231
+ msgid "Exclude"
232
+ msgstr ""
233
+
234
+ #: .././node_modules/grunt-wp-i18n/test/fixtures/plugin-include/include/file.php:2
235
+ msgid "Include"
236
+ msgstr ""
237
+
238
+ #: .././node_modules/grunt-wp-i18n/test/fixtures/text-domains/add-domain.php:2
239
+ #: .././node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-domains.php:2
240
+ #: .././node_modules/grunt-wp-i18n/test/fixtures/text-domains/update-domains.php:3
241
+ msgid "String"
242
+ msgstr ""
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.barrykooij.com/
4
  Tags: related posts for wordpress, related posts for wp, simple related posts, easy related posts, related posts, related, relations, internal links, seo
5
  Requires at least: 3.6
6
  Tested up to: 3.9.2
7
- Stable tag: 1.2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -25,7 +25,7 @@ We don't think having related posts should slow down your website. That's why Re
25
  After installing the plugin you will be taking to a wizard that will analyze your posts and link them to each other based on what we think is related. This means you can install Related Posts for WordPress on your website that has thousands of posts and create related connections on the fly, without any manual work!
26
 
27
  = Manually add, edit or remove =
28
- Everyone makes mistakes, so do we. That's why you can easily modify all automatically created related posts. Simply navigate to the post that has incorrect related posts attached to it, edit it and your done.
29
 
30
  = WPML compatible =
31
  Related Posts for WordPress is fully compatible with WPML. You can automatically and manually link related posts in their own language.
@@ -61,6 +61,9 @@ Yes, clear the CSS field in the Related Posts for WordPress settings screen.
61
  = Is there a theme function so I can output this list anywhere in my theme I want? =
62
  Not yet, we're working on this and this will be added soon!
63
 
 
 
 
64
  = Does the plugin uses it's own database table ? =
65
  There is one custom table created for the post cache, this table will however not be used at the frontend of your website. Related Posts are fetched with normal WP_Query objects.
66
 
@@ -73,6 +76,13 @@ There is one custom table created for the post cache, this table will however no
73
 
74
  == Changelog ==
75
 
 
 
 
 
 
 
 
76
  = 1.2.2 : August 16, 2014 =
77
  * Solved a conflict with the NextGen plugin (apply_filters recursion on same filter kills underlying call).
78
  * Excerpt length is now set in words instead of characters.
4
  Tags: related posts for wordpress, related posts for wp, simple related posts, easy related posts, related posts, related, relations, internal links, seo
5
  Requires at least: 3.6
6
  Tested up to: 3.9.2
7
+ Stable tag: 1.3.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
25
  After installing the plugin you will be taking to a wizard that will analyze your posts and link them to each other based on what we think is related. This means you can install Related Posts for WordPress on your website that has thousands of posts and create related connections on the fly, without any manual work!
26
 
27
  = Manually add, edit or remove =
28
+ Everyone makes mistakes, so do we. That's why you can easily modify all automatically created related posts. Simply navigate to the post that has incorrect related posts attached to it, edit it and you're done.
29
 
30
  = WPML compatible =
31
  Related Posts for WordPress is fully compatible with WPML. You can automatically and manually link related posts in their own language.
61
  = Is there a theme function so I can output this list anywhere in my theme I want? =
62
  Not yet, we're working on this and this will be added soon!
63
 
64
+ = Is there a shortcode? =
65
+ Yes, use [rp4wp]
66
+
67
  = Does the plugin uses it's own database table ? =
68
  There is one custom table created for the post cache, this table will however not be used at the frontend of your website. Related Posts are fetched with normal WP_Query objects.
69
 
76
 
77
  == Changelog ==
78
 
79
+ = 1.3.0 : August 18, 2014 =
80
+ * Added 'rp4wp_children' template function.
81
+ * Added shortcode [rp4wp]
82
+ * Added pot translation template file.
83
+ * Added Dutch translation.
84
+ * Added review request admin notice.
85
+
86
  = 1.2.2 : August 16, 2014 =
87
  * Solved a conflict with the NextGen plugin (apply_filters recursion on same filter kills underlying call).
88
  * Excerpt length is now set in words instead of characters.
related-posts-for-wp.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Related Posts for WordPress
4
  Plugin URI: http://www.barrykooij.com/
5
  Description: Related Posts for WordPress, related posts that perform!
6
- Version: 1.2.2
7
  Author: Barry Kooij
8
  Author URI: http://www.barrykooij.com/
9
  License: GPL v3
@@ -26,7 +26,7 @@ class RP4WP {
26
 
27
  private static $instance = null;
28
 
29
- const VERSION = '1.2.2';
30
 
31
  /**
32
  * @var RP4WP_Settings
@@ -42,9 +42,10 @@ class RP4WP {
42
  * @return RP4WP
43
  */
44
  public static function get() {
45
- if(null == self::$instance) {
46
  self::$instance = new self();
47
  }
 
48
  return self::$instance;
49
  }
50
 
@@ -96,7 +97,7 @@ class RP4WP {
96
  */
97
  private function init() {
98
 
99
- // Setup the autolaoder
100
  self::setup_autoloader();
101
 
102
  // Check if we need to run the installer
@@ -120,6 +121,17 @@ class RP4WP {
120
  // Hooks
121
  $manager_hook = new RP4WP_Manager_Hook( plugin_dir_path( __FILE__ ) . 'classes/hooks/' );
122
  $manager_hook->load_hooks();
 
 
 
 
 
 
 
 
 
 
 
123
  }
124
 
125
  }
3
  Plugin Name: Related Posts for WordPress
4
  Plugin URI: http://www.barrykooij.com/
5
  Description: Related Posts for WordPress, related posts that perform!
6
+ Version: 1.3.0
7
  Author: Barry Kooij
8
  Author URI: http://www.barrykooij.com/
9
  License: GPL v3
26
 
27
  private static $instance = null;
28
 
29
+ const VERSION = '1.3.0';
30
 
31
  /**
32
  * @var RP4WP_Settings
42
  * @return RP4WP
43
  */
44
  public static function get() {
45
+ if ( null == self::$instance ) {
46
  self::$instance = new self();
47
  }
48
+
49
  return self::$instance;
50
  }
51
 
97
  */
98
  private function init() {
99
 
100
+ // Setup the autoloader
101
  self::setup_autoloader();
102
 
103
  // Check if we need to run the installer
121
  // Hooks
122
  $manager_hook = new RP4WP_Manager_Hook( plugin_dir_path( __FILE__ ) . 'classes/hooks/' );
123
  $manager_hook->load_hooks();
124
+
125
+ // Include template functions
126
+ if ( !is_admin() ) {
127
+ require_once( plugin_dir_path( self::get_plugin_file() ) . '/includes/template-functions.php' );
128
+ }
129
+
130
+ // Setup the nag
131
+ if(is_admin()) {
132
+ $nag_manager = new RP4WP_Nag_Manager();
133
+ $nag_manager->setup();
134
+ }
135
  }
136
 
137
  }