Posts 2 Posts - Version 1.6.1

Version Description

  • fixed user column handling. props versusbassz
  • fixed PHP strict standards warnings. props meloniq
  • added Estonian translation. props RistoNiinemets
  • added Finnish translation. props danielck
Download this release

Release Info

Developer scribu
Plugin Icon wp plugin Posts 2 Posts
Version 1.6.1
Comparing to
See all releases

Code changes from version 1.6 to 1.6.1

admin/box-factory.php CHANGED
@@ -9,7 +9,7 @@ class P2P_Box_Factory extends P2P_Factory {
9
  function __construct() {
10
  parent::__construct();
11
 
12
- add_action( 'add_meta_boxes', array( $this, 'add_items' ) );
13
  add_action( 'save_post', array( $this, 'save_post' ), 10, 2 );
14
  add_action( 'wp_ajax_p2p_box', array( $this, 'wp_ajax_p2p_box' ) );
15
  }
@@ -32,7 +32,7 @@ class P2P_Box_Factory extends P2P_Factory {
32
  return $box_args;
33
  }
34
 
35
- function add_items( $post_type ) {
36
  $this->filter( 'post', $post_type );
37
  }
38
 
9
  function __construct() {
10
  parent::__construct();
11
 
12
+ add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
13
  add_action( 'save_post', array( $this, 'save_post' ), 10, 2 );
14
  add_action( 'wp_ajax_p2p_box', array( $this, 'wp_ajax_p2p_box' ) );
15
  }
32
  return $box_args;
33
  }
34
 
35
+ function add_meta_boxes( $post_type ) {
36
  $this->filter( 'post', $post_type );
37
  }
38
 
admin/column-user.php CHANGED
@@ -40,7 +40,7 @@ class P2P_Column_User extends P2P_Column {
40
  }
41
 
42
  function display_column( $content, $column, $item_id ) {
43
- return parent::render_column( $column, $item_id );
44
  }
45
  }
46
 
40
  }
41
 
42
  function display_column( $content, $column, $item_id ) {
43
+ return $content . parent::render_column( $column, $item_id );
44
  }
45
  }
46
 
admin/tools-page.php CHANGED
@@ -47,7 +47,7 @@ class P2P_Tools_Page extends scbAdminPage {
47
  array( 'p2p_type' => $old_p2p_type )
48
  );
49
 
50
- $this->admin_msg( sprintf( __( 'Converted %1$s connections from <em>%2$s</em> to <em>%3$s</em>.' ),
51
  number_format_i18n( $count ),
52
  esc_html( $old_p2p_type ),
53
  esc_html( $new_p2p_type )
47
  array( 'p2p_type' => $old_p2p_type )
48
  );
49
 
50
+ $this->admin_msg( sprintf( __( 'Converted %1$s connections from <em>%2$s</em> to <em>%3$s</em>.', P2P_TEXTDOMAIN ),
51
  number_format_i18n( $count ),
52
  esc_html( $old_p2p_type ),
53
  esc_html( $new_p2p_type )
core/indeterminate-directed-connection-type.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  class P2P_Indeterminate_Directed_Connection_Type extends P2P_Directed_Connection_Type {
4
 
5
- protected function recognize( $arg ) {
6
  foreach ( array( 'current', 'opposite' ) as $side ) {
7
  $item = $this->get( $side, 'side' )->item_recognize( $arg );
8
  if ( $item )
@@ -12,7 +12,7 @@ class P2P_Indeterminate_Directed_Connection_Type extends P2P_Directed_Connection
12
  return false;
13
  }
14
 
15
- public function get_final_qv( $q ) {
16
  $side = $this->get( 'current', 'side' );
17
 
18
  // the sides are of the same type, so just use one for translating
2
 
3
  class P2P_Indeterminate_Directed_Connection_Type extends P2P_Directed_Connection_Type {
4
 
5
+ protected function recognize( $arg, $unused = null ) {
6
  foreach ( array( 'current', 'opposite' ) as $side ) {
7
  $item = $this->get( $side, 'side' )->item_recognize( $arg );
8
  if ( $item )
12
  return false;
13
  }
14
 
15
+ public function get_final_qv( $q, $unused = null ) {
16
  $side = $this->get( 'current', 'side' );
17
 
18
  // the sides are of the same type, so just use one for translating
core/widget.php CHANGED
@@ -8,8 +8,11 @@ class P2P_Widget extends scbWidget {
8
  'title' => ''
9
  );
10
 
11
- static function init() {
12
- parent::init( __CLASS__, false, 'p2p' );
 
 
 
13
  }
14
 
15
  function __construct() {
8
  'title' => ''
9
  );
10
 
11
+ static function init( $class = '', $file = false, $base = 'p2p' ) {
12
+ if ( empty( $class ) )
13
+ $class = __CLASS__;
14
+
15
+ parent::init( $class, $file, $base );
16
  }
17
 
18
  function __construct() {
lang/posts-to-posts-et_EE.mo ADDED
Binary file
lang/posts-to-posts-et_EE.po ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Posts 2 Posts v1.6\n"
4
+ "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: \n"
6
+ "PO-Revision-Date: 2013-05-17 22:15:56+0000\n"
7
+ "Last-Translator: admin <risto.niinemets@gmail.com>\n"
8
+ "Language-Team: \n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Generator: CSL v1.x\n"
14
+ "X-Poedit-Language: Estonian\n"
15
+ "X-Poedit-Country: ESTONIA\n"
16
+ "X-Poedit-SourceCharset: utf-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
18
+ "X-Poedit-Basepath: ../\n"
19
+ "X-Poedit-Bookmarks: \n"
20
+ "X-Poedit-SearchPath-0: .\n"
21
+ "X-Textdomain-Support: yes"
22
+
23
+ #: admin/box.php:45
24
+ #@ posts-to-posts
25
+ msgid "Are you sure you want to delete all connections?"
26
+ msgstr "Kas oled kindel, et soovid kõik ühendused eemaldada?"
27
+
28
+ #: admin/box.php:137
29
+ #@ posts-to-posts
30
+ msgid "Search"
31
+ msgstr "Otsi"
32
+
33
+ #: admin/box.php:224
34
+ #@ posts-to-posts
35
+ msgid "previous"
36
+ msgstr "eelmine"
37
+
38
+ #: admin/box.php:225
39
+ #@ posts-to-posts
40
+ msgid "next"
41
+ msgstr "järgmine"
42
+
43
+ #: admin/box.php:226
44
+ #@ posts-to-posts
45
+ msgid "of"
46
+ msgstr ""
47
+
48
+ #: admin/dropdown-user.php:32
49
+ #@ posts-to-posts
50
+ msgid "Filter"
51
+ msgstr "Filtreeri"
52
+
53
+ #: admin/factory.php:88
54
+ #@ posts-to-posts
55
+ msgid " (from)"
56
+ msgstr "(algus)"
57
+
58
+ #: admin/factory.php:89
59
+ #@ posts-to-posts
60
+ msgid " (to)"
61
+ msgstr "(lõpp)"
62
+
63
+ #: admin/field-delete.php:7
64
+ #@ posts-to-posts
65
+ msgid "Delete all connections"
66
+ msgstr "Eemalda ühendused"
67
+
68
+ #: admin/field-delete.php:16
69
+ #@ posts-to-posts
70
+ msgid "Delete connection"
71
+ msgstr "Eemalda ühendus"
72
+
73
+ #: admin/tools-page.php:7
74
+ #@ posts-to-posts
75
+ msgid "Connection Types"
76
+ msgstr "Ühenduse tüübid"
77
+
78
+ #: admin/tools-page.php:41
79
+ #, php-format
80
+ #@ posts-to-posts
81
+ msgid "<em>%s</em> is not a registered connection type."
82
+ msgstr "<em>%s</em> ei ole registreeritud ühenduse tüüp."
83
+
84
+ #: admin/tools-page.php:50
85
+ #, php-format
86
+ #@ posts-to-posts
87
+ msgid "Converted %1$s connections from <em>%2$s</em> to <em>%3$s</em>."
88
+ msgstr "Muuda %1$s ühendused <em>%2$s</em> -> <em>%3$s</em>."
89
+
90
+ #: admin/tools-page.php:64
91
+ #@ posts-to-posts
92
+ msgid "Name"
93
+ msgstr "Nimetus"
94
+
95
+ #: admin/tools-page.php:65
96
+ #@ posts-to-posts
97
+ msgid "Information"
98
+ msgstr "Informatsioon"
99
+
100
+ #: admin/tools-page.php:66
101
+ #@ posts-to-posts
102
+ msgid "Connections"
103
+ msgstr "Ühenduste arv"
104
+
105
+ #: admin/tools-page.php:74
106
+ #@ posts-to-posts
107
+ msgid "No connection types registered."
108
+ msgstr "Ühenduse tüüpe ei ole registreeritud."
109
+
110
+ #: admin/tools-page.php:76
111
+ #, php-format
112
+ #@ posts-to-posts
113
+ msgid "To register a connection type, see <a href=\"%s\">the wiki</a>."
114
+ msgstr "Uue ühenduse registreerimiseks vaata <a href=\"%s\">wikit</a>."
115
+
116
+ #: admin/tools-page.php:93
117
+ #@ posts-to-posts
118
+ msgid "Convert to registered connection type:"
119
+ msgstr "Muuda regisreeritud ühenduse tüübiks:"
120
+
121
+ #: admin/tools-page.php:129
122
+ #@ posts-to-posts
123
+ msgid "Go"
124
+ msgstr "Mine"
125
+
126
+ #: core/connection-type.php:91
127
+ #@ posts-to-posts
128
+ msgid "Create connections"
129
+ msgstr "Loo ühendus"
130
+
131
+ #: core/connection-type.php:109
132
+ #, php-format
133
+ #@ posts-to-posts
134
+ msgid "Connected %s"
135
+ msgstr "Ühendused: %s"
136
+
137
+ #: core/side-user.php:16
138
+ #@ posts-to-posts
139
+ msgid "Users"
140
+ msgstr "Kasutajad"
141
+
142
+ #: core/side-user.php:25
143
+ #@ posts-to-posts
144
+ msgid "User"
145
+ msgstr "Kasutaja"
146
+
147
+ #: core/side-user.php:26
148
+ #@ posts-to-posts
149
+ msgid "Search Users"
150
+ msgstr "Otsi kasutajaid"
151
+
152
+ #: core/side-user.php:27
153
+ #@ posts-to-posts
154
+ msgid "No users found."
155
+ msgstr "Kasutajaid ei leitud."
156
+
157
+ #. translators: plugin header field 'Name'
158
+ #: core/widget.php:16
159
+ #: posts-to-posts.php:0
160
+ #@ posts-to-posts
161
+ msgid "Posts 2 Posts"
162
+ msgstr "Posts 2 Posts"
163
+
164
+ #: core/widget.php:17
165
+ #@ posts-to-posts
166
+ msgid "A list of posts connected to the current post"
167
+ msgstr "Nimekiri selle postituse külge ühendatud postitustest"
168
+
169
+ #: core/widget.php:34
170
+ #@ posts-to-posts
171
+ msgid "Title:"
172
+ msgstr "Pealkiri:"
173
+
174
+ #: core/widget.php:41
175
+ #@ posts-to-posts
176
+ msgid "Connection type:"
177
+ msgstr "Ühenduse tüüp:"
178
+
179
+ #: core/widget.php:46
180
+ #@ posts-to-posts
181
+ msgid "Connection listing:"
182
+ msgstr "Ühendused:"
183
+
184
+ #: core/widget.php:52
185
+ #@ posts-to-posts
186
+ msgid "connected"
187
+ msgstr "ühendatud"
188
+
189
+ #: core/widget.php:53
190
+ #@ posts-to-posts
191
+ msgid "related"
192
+ msgstr "seotud"
193
+
194
+ #. translators: plugin header field 'PluginURI'
195
+ #: posts-to-posts.php:0
196
+ #@ posts-to-posts
197
+ msgid "http://scribu.net/wordpress/posts-to-posts"
198
+ msgstr "http://scribu.net/wordpress/posts-to-posts"
199
+
200
+ #. translators: plugin header field 'Description'
201
+ #: posts-to-posts.php:0
202
+ #@ posts-to-posts
203
+ msgid "Create many-to-many relationships between all types of posts."
204
+ msgstr "Loo mitmeid ühendusi kõikide postituste tüüpide vahel."
205
+
206
+ #. translators: plugin header field 'Author'
207
+ #: posts-to-posts.php:0
208
+ #@ posts-to-posts
209
+ msgid "scribu"
210
+ msgstr "scribu"
211
+
212
+ #. translators: plugin header field 'AuthorURI'
213
+ #: posts-to-posts.php:0
214
+ #@ posts-to-posts
215
+ msgid "http://scribu.net/"
216
+ msgstr "http://scribu.net/"
217
+
218
+ #. translators: plugin header field 'Version'
219
+ #: posts-to-posts.php:0
220
+ #@ posts-to-posts
221
+ msgid "1.6"
222
+ msgstr "1.6"
223
+
224
+ #: scb/AdminPage.php:227
225
+ #@ posts-to-posts
226
+ msgid "Settings <strong>saved</strong>."
227
+ msgstr "Seaded <strong>salvestatud</strong>."
228
+
229
+ #: scb/AdminPage.php:466
230
+ #@ posts-to-posts
231
+ msgid "Settings"
232
+ msgstr "Seaded"
233
+
lang/posts-to-posts-fi.mo ADDED
Binary file
lang/posts-to-posts-fi.po ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: Posts 2 Posts\n"
4
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/p2p\n"
5
+ "POT-Creation-Date: 2013-02-17 08:06:11+00:00\n"
6
+ "PO-Revision-Date: \n"
7
+ "Last-Translator: Daniel Koskinen <daniel.koskinen@gmail.com>\n"
8
+ "Language-Team: Daniel Koskinen <dani@dani.fi>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
13
+ "X-Poedit-Language: Finnish\n"
14
+ "X-Poedit-Country: FINLAND\n"
15
+ "X-Poedit-SourceCharset: utf-8\n"
16
+
17
+ #: admin/box.php:45
18
+ msgid "Are you sure you want to delete all connections?"
19
+ msgstr "Haluatko varmasti poistaa kaikki yhteydet?"
20
+
21
+ #: admin/box.php:136
22
+ msgid "Search"
23
+ msgstr "Hae"
24
+
25
+ #: admin/box.php:213
26
+ msgid "previous"
27
+ msgstr "edellinen"
28
+
29
+ #: admin/box.php:214
30
+ msgid "next"
31
+ msgstr "seuraava"
32
+
33
+ #: admin/box.php:215
34
+ msgid "of"
35
+ msgstr "/"
36
+
37
+ #: admin/dropdown-user.php:32
38
+ msgid "Filter"
39
+ msgstr "Suodata"
40
+
41
+ #: admin/factory.php:88
42
+ msgid " (from)"
43
+ msgstr " (lähde)"
44
+
45
+ #: admin/factory.php:89
46
+ msgid " (to)"
47
+ msgstr " (kohde)"
48
+
49
+ #: admin/field-delete.php:7
50
+ msgid "Delete all connections"
51
+ msgstr "Poista kaikki yhteydet"
52
+
53
+ #: admin/field-delete.php:16
54
+ msgid "Delete connection"
55
+ msgstr "Poista yhteys"
56
+
57
+ #: admin/tools-page.php:7
58
+ msgid "Connection Types"
59
+ msgstr "Yhteystyyppi"
60
+
61
+ #: admin/tools-page.php:41
62
+ msgid "<em>%s</em> is not a registered connection type."
63
+ msgstr "<em>%s</em> ei ole rekisteröity yhteystyyppi."
64
+
65
+ #: admin/tools-page.php:50
66
+ msgid "Converted %1$s connections from <em>%2$s</em> to <em>%3$s</em>."
67
+ msgstr "%1$s yhteyden tyyppi on vaihdettu. Alkuperäinen tyyppi: <em>%2$s</em>. Uusi tyyppi: <em>%3$s</em>."
68
+
69
+ #: admin/tools-page.php:64
70
+ msgid "Name"
71
+ msgstr "Nimi"
72
+
73
+ #: admin/tools-page.php:65
74
+ msgid "Information"
75
+ msgstr "Tiedot"
76
+
77
+ #: admin/tools-page.php:66
78
+ msgid "Connections"
79
+ msgstr "Yhteydet"
80
+
81
+ #: admin/tools-page.php:74
82
+ msgid "No connection types registered."
83
+ msgstr "Yhteystyyppejä ei ole rekisteröity"
84
+
85
+ #: admin/tools-page.php:76
86
+ msgid "To register a connection type, see <a href=\"%s\">the wiki</a>."
87
+ msgstr "Katso <a href=\"%s\">wikistä</a> ohjeet yhteystyyppien rekisteröimiseen."
88
+
89
+ #: admin/tools-page.php:93
90
+ msgid "Convert to registered connection type:"
91
+ msgstr "Vaihda rekisteröityyn yhteystyyppiin:"
92
+
93
+ #: admin/tools-page.php:129
94
+ msgid "Go"
95
+ msgstr "OK"
96
+
97
+ #: core/connection-type.php:102
98
+ msgid "Create connections"
99
+ msgstr "Lisää yhteys"
100
+
101
+ #: core/connection-type.php:120
102
+ msgid "Connected %s"
103
+ msgstr "Liitetyt %s"
104
+
105
+ #: core/side-user.php:16
106
+ msgid "Users"
107
+ msgstr "Käyttäjät"
108
+
109
+ #: core/side-user.php:25
110
+ msgid "User"
111
+ msgstr "Käyttäjä"
112
+
113
+ #: core/side-user.php:26
114
+ msgid "Search Users"
115
+ msgstr "Hae käyttäjiä"
116
+
117
+ #: core/side-user.php:27
118
+ msgid "No users found."
119
+ msgstr "Käyttäjiä ei löytynyt"
120
+
121
+ #: core/widget.php:16
122
+ msgid "Posts 2 Posts"
123
+ msgstr "Posts 2 Posts"
124
+
125
+ #: core/widget.php:17
126
+ msgid "A list of posts connected to the current post"
127
+ msgstr "Tähän artikkeliin liitetyt sisällöt"
128
+
129
+ #: core/widget.php:34
130
+ msgid "Title:"
131
+ msgstr "Otsikko:"
132
+
133
+ #: core/widget.php:41
134
+ msgid "Connection type:"
135
+ msgstr "Yhteystyyppi:"
136
+
137
+ #: core/widget.php:46
138
+ msgid "Connection listing:"
139
+ msgstr "Listan sisältö:"
140
+
141
+ #: core/widget.php:52
142
+ msgid "connected"
143
+ msgstr "yhteydet"
144
+
145
+ #: core/widget.php:53
146
+ msgid "related"
147
+ msgstr "rinnakkaiset"
148
+
149
+ #: scb/AdminPage.php:227
150
+ msgid "Settings <strong>saved</strong>."
151
+ msgstr "Asetukset <strong>tallennettu</strong>."
152
+
153
+ #: scb/AdminPage.php:466
154
+ msgid "Settings"
155
+ msgstr "Asetukset"
156
+
posts-to-posts.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Posts 2 Posts
4
  Description: Create many-to-many relationships between all types of posts.
5
- Version: 1.6
6
  Author: scribu
7
  Author URI: http://scribu.net/
8
  Plugin URI: http://scribu.net/wordpress/posts-to-posts
@@ -10,7 +10,7 @@ Text Domain: posts-to-posts
10
  Domain Path: /lang
11
  */
12
 
13
- define( 'P2P_PLUGIN_VERSION', '1.6' );
14
 
15
  define( 'P2P_TEXTDOMAIN', 'posts-to-posts' );
16
 
2
  /*
3
  Plugin Name: Posts 2 Posts
4
  Description: Create many-to-many relationships between all types of posts.
5
+ Version: 1.6.1
6
  Author: scribu
7
  Author URI: http://scribu.net/
8
  Plugin URI: http://scribu.net/wordpress/posts-to-posts
10
  Domain Path: /lang
11
  */
12
 
13
+ define( 'P2P_PLUGIN_VERSION', '1.6.1' );
14
 
15
  define( 'P2P_TEXTDOMAIN', 'posts-to-posts' );
16
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: scribu, ciobi
4
  Tags: connections, custom post types, relationships, many-to-many, users
5
  Requires at least: 3.5
6
  Tested up to: 3.5
7
- Stable tag: 1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -57,6 +57,12 @@ Additional info can be found on the [wiki](http://github.com/scribu/wp-posts-to-
57
 
58
  == Changelog ==
59
 
 
 
 
 
 
 
60
  = 1.6 =
61
  * introduced `p2p_candidate_title` filter
62
  * introduced JavaScript API
4
  Tags: connections, custom post types, relationships, many-to-many, users
5
  Requires at least: 3.5
6
  Tested up to: 3.5
7
+ Stable tag: 1.6.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
57
 
58
  == Changelog ==
59
 
60
+ = 1.6.1 =
61
+ * fixed user column handling. props versusbassz
62
+ * fixed PHP strict standards warnings. props meloniq
63
+ * added Estonian translation. props RistoNiinemets
64
+ * added Finnish translation. props danielck
65
+
66
  = 1.6 =
67
  * introduced `p2p_candidate_title` filter
68
  * introduced JavaScript API