Orphans - Version 2.7.4

Version Description

  • 2018-03-16 =

  • Fixed problem with too greedy number replacement.

Download this release

Release Info

Developer iworks
Plugin Icon 128x128 Orphans
Version 2.7.4
Comparing to
See all releases

Code changes from version 2.7.3 to 2.7.4

languages/sierotki.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: Orphans PLUGIN_VERSION\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/sierotki\n"
7
- "POT-Creation-Date: 2018-03-15 16:08:58+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -204,35 +204,35 @@ msgstr ""
204
  msgid "ON"
205
  msgstr ""
206
 
207
- #: vendor/iworks/orphan.php:190
208
  msgid "Plugin fix some Polish gramary rules with orphans."
209
  msgstr ""
210
 
211
- #: vendor/iworks/orphan.php:196
212
  msgid "For more information:"
213
  msgstr ""
214
 
215
- #: vendor/iworks/orphan.php:197
216
  msgid ""
217
  "<a href=\"http://wordpress.org/extend/plugins/sierotki/\" "
218
  "target=\"_blank\">Plugin Homepage</a>"
219
  msgstr ""
220
 
221
- #: vendor/iworks/orphan.php:198
222
  msgid ""
223
  "<a href=\"http://wordpress.org/support/plugin/sierotki/\" "
224
  "target=\"_blank\">Support Forums</a>"
225
  msgstr ""
226
 
227
- #: vendor/iworks/orphan.php:199
228
  msgid "<a href=\"http://iworks.pl/en/\" target=\"_blank\">break the web</a>"
229
  msgstr ""
230
 
231
- #: vendor/iworks/orphan.php:289
232
  msgid "Settings"
233
  msgstr ""
234
 
235
- #: vendor/iworks/orphan.php:309
236
  msgid "Donate"
237
  msgstr ""
238
 
4
  msgstr ""
5
  "Project-Id-Version: Orphans PLUGIN_VERSION\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/sierotki\n"
7
+ "POT-Creation-Date: 2018-03-16 10:01:15+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
204
  msgid "ON"
205
  msgstr ""
206
 
207
+ #: vendor/iworks/orphan.php:200
208
  msgid "Plugin fix some Polish gramary rules with orphans."
209
  msgstr ""
210
 
211
+ #: vendor/iworks/orphan.php:206
212
  msgid "For more information:"
213
  msgstr ""
214
 
215
+ #: vendor/iworks/orphan.php:207
216
  msgid ""
217
  "<a href=\"http://wordpress.org/extend/plugins/sierotki/\" "
218
  "target=\"_blank\">Plugin Homepage</a>"
219
  msgstr ""
220
 
221
+ #: vendor/iworks/orphan.php:208
222
  msgid ""
223
  "<a href=\"http://wordpress.org/support/plugin/sierotki/\" "
224
  "target=\"_blank\">Support Forums</a>"
225
  msgstr ""
226
 
227
+ #: vendor/iworks/orphan.php:209
228
  msgid "<a href=\"http://iworks.pl/en/\" target=\"_blank\">break the web</a>"
229
  msgstr ""
230
 
231
+ #: vendor/iworks/orphan.php:299
232
  msgid "Settings"
233
  msgstr ""
234
 
235
+ #: vendor/iworks/orphan.php:319
236
  msgid "Donate"
237
  msgstr ""
238
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://iworks.pl/donate/sierotki.php
4
  Tags: sierotka, sierotki, spójniki, twarda spacja
5
  Requires at least: 3.6
6
  Tested up to: 4.9.4
7
- Stable tag: 2.7.3
8
 
9
  Plugin supports some of the grammatical rules of the Polish language.
10
 
@@ -97,6 +97,10 @@ function my_orphans_capability($capability) {
97
 
98
  == Changelog ==
99
 
 
 
 
 
100
  = 2.7.3 - 2018-03-15 =
101
 
102
  * Fixed problem with $post object. Props for [adpawl](https://wordpress.org/support/users/adpawl/)
4
  Tags: sierotka, sierotki, spójniki, twarda spacja
5
  Requires at least: 3.6
6
  Tested up to: 4.9.4
7
+ Stable tag: 2.7.4
8
 
9
  Plugin supports some of the grammatical rules of the Polish language.
10
 
97
 
98
  == Changelog ==
99
 
100
+ = 2.7.4 - 2018-03-16 =
101
+
102
+ * Fixed problem with too greedy number replacement.
103
+
104
  = 2.7.3 - 2018-03-15 =
105
 
106
  * Fixed problem with $post object. Props for [adpawl](https://wordpress.org/support/users/adpawl/)
sierotki.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://iworks.pl/2011/02/16/sierotki/
5
  Text Domain: sierotki
6
  Description: Implement Polish grammar rules with orphans.
7
  Author: Marcin Pietrzak
8
- Version: 2.7.3
9
  Author URI: http://iworks.pl/
10
  */
11
 
5
  Text Domain: sierotki
6
  Description: Implement Polish grammar rules with orphans.
7
  Author: Marcin Pietrzak
8
+ Version: 2.7.4
9
  Author URI: http://iworks.pl/
10
  */
11
 
vendor/iworks/orphan.php CHANGED
@@ -109,8 +109,18 @@ class iworks_orphan
109
  */
110
  $numbers = $this->is_on( 'numbers' );
111
  if ( $numbers ) {
112
- while ( preg_match( '/(\d+) ([\da-z]+)/i', $content, $matches ) ) {
113
- $content = preg_replace( '/(\d+) ([\da-z]+)/i', '$1&nbsp;$2', $content );
 
 
 
 
 
 
 
 
 
 
114
  }
115
  }
116
  /**
109
  */
110
  $numbers = $this->is_on( 'numbers' );
111
  if ( $numbers ) {
112
+ preg_match_all( '/(>[^<]+<)/', $content, $parts );
113
+ if ( $parts && is_array( $parts ) && ! empty( $parts ) ) {
114
+ $parts = array_shift( $parts );
115
+ foreach ( $parts as $part ) {
116
+ $to_change = $part;
117
+ while ( preg_match( '/(\d+) ([\da-z]+)/i', $to_change, $matches ) ) {
118
+ $to_change = preg_replace( '/(\d+) ([\da-z]+)/i', '$1&nbsp;$2', $to_change );
119
+ }
120
+ if ( $part != $to_change ) {
121
+ $content = str_replace( $part, $to_change, $content );
122
+ }
123
+ }
124
  }
125
  }
126
  /**