Version Description
- 2021-12-03 =
- Fixed problem with option "Keep numbers together" - it changed inline CSS too. Props for gierand.
Download this release
Release Info
Developer | iworks |
Plugin | Orphans |
Version | 2.8.2 |
Comparing to | |
See all releases |
Code changes from version 2.8.1 to 2.8.2
- includes/iworks/orphan.php +15 -15
- languages/sierotki.pot +1 -1
- readme.txt +5 -2
- sierotki.php +1 -1
includes/iworks/orphan.php
CHANGED
@@ -180,6 +180,20 @@ class iworks_orphan {
|
|
180 |
if ( ! is_string( $content ) || empty( $content ) ) {
|
181 |
return $content;
|
182 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
/**
|
184 |
* Keep numbers together - this is independed of current language
|
185 |
*/
|
@@ -199,26 +213,12 @@ class iworks_orphan {
|
|
199 |
}
|
200 |
}
|
201 |
}
|
202 |
-
$terms = $this->_terms();
|
203 |
-
/**
|
204 |
-
* Avoid to replace inside script or styles tags
|
205 |
-
*/
|
206 |
-
preg_match_all( '@(<(script|style)[^>]*>.*?(</(script|style)>))@is', $content, $matches );
|
207 |
-
$exceptions = array();
|
208 |
-
if ( ! empty( $matches ) && ! empty( $matches[0] ) ) {
|
209 |
-
$salt = 'kQc6T9fn5GhEzTM3Sxn7b9TWMV4PO0mOCV06Da7AQJzSJqxYR4z3qBlsW9rtFsWK';
|
210 |
-
foreach ( $matches[0] as $one ) {
|
211 |
-
$key = sprintf( '<!-- %s %s -->', $salt, md5( $one ) );
|
212 |
-
$exceptions[ $key ] = $one;
|
213 |
-
$re = sprintf( '@%s@', preg_replace( '/@/', '\@', preg_quote( $one, '/' ) ) );
|
214 |
-
$content = preg_replace( $re, $key, $content );
|
215 |
-
}
|
216 |
-
}
|
217 |
/**
|
218 |
* Chunk terms
|
219 |
*
|
220 |
* @since 2.7.6
|
221 |
*/
|
|
|
222 |
$terms_terms = array_chunk( $terms, 10 );
|
223 |
foreach ( $terms_terms as $terms ) {
|
224 |
/**
|
180 |
if ( ! is_string( $content ) || empty( $content ) ) {
|
181 |
return $content;
|
182 |
}
|
183 |
+
/**
|
184 |
+
* Avoid to replace inside script or styles tags
|
185 |
+
*/
|
186 |
+
preg_match_all( '@(<(script|style)[^>]*>.*?(</(script|style)>))@is', $content, $matches );
|
187 |
+
$exceptions = array();
|
188 |
+
if ( ! empty( $matches ) && ! empty( $matches[0] ) ) {
|
189 |
+
$salt = 'kQc6T9fn5GhEzTM3Sxn7b9TWMV4PO0mOCV06Da7AQJzSJqxYR4z3qBlsW9rtFsWK';
|
190 |
+
foreach ( $matches[0] as $one ) {
|
191 |
+
$key = sprintf( '<!-- %s %s -->', $salt, md5( $one ) );
|
192 |
+
$exceptions[ $key ] = $one;
|
193 |
+
$re = sprintf( '@%s@', preg_replace( '/@/', '\@', preg_quote( $one, '/' ) ) );
|
194 |
+
$content = preg_replace( $re, $key, $content );
|
195 |
+
}
|
196 |
+
}
|
197 |
/**
|
198 |
* Keep numbers together - this is independed of current language
|
199 |
*/
|
213 |
}
|
214 |
}
|
215 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
/**
|
217 |
* Chunk terms
|
218 |
*
|
219 |
* @since 2.7.6
|
220 |
*/
|
221 |
+
$terms = $this->_terms();
|
222 |
$terms_terms = array_chunk( $terms, 10 );
|
223 |
foreach ( $terms_terms as $terms ) {
|
224 |
/**
|
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: 2021-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
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: 2021-12-03 17:00:52+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: iworks
|
|
3 |
Donate link: https://ko-fi.com/iworks?utm_source=sierotki&utm_medium=readme-donate
|
4 |
Tags: sierotka, sierotki, spójniki, twarda spacja
|
5 |
Requires at least: 4.6
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 2.8.
|
8 |
|
9 |
Plugin supports some of the grammatical rules of the Polish language.
|
10 |
|
@@ -126,6 +126,9 @@ function remove_iworks_orphan_terms( $terms ) {
|
|
126 |
|
127 |
== Changelog ==
|
128 |
|
|
|
|
|
|
|
129 |
= 2.8.1 - 2021-11-26 =
|
130 |
* Added a widget blocks content to replacements.
|
131 |
* Added filter `iworks_orphan_terms` (old one has a typo `iworks_orphan_therms` - but old one stays too).
|
3 |
Donate link: https://ko-fi.com/iworks?utm_source=sierotki&utm_medium=readme-donate
|
4 |
Tags: sierotka, sierotki, spójniki, twarda spacja
|
5 |
Requires at least: 4.6
|
6 |
+
Tested up to: 5.9
|
7 |
+
Stable tag: 2.8.2
|
8 |
|
9 |
Plugin supports some of the grammatical rules of the Polish language.
|
10 |
|
126 |
|
127 |
== Changelog ==
|
128 |
|
129 |
+
= 2.8.2 - 2021-12-03 =
|
130 |
+
* Fixed problem with option "Keep numbers together" - it changed inline CSS too. Props for [gierand](https://wordpress.org/support/users/gierand/).
|
131 |
+
|
132 |
= 2.8.1 - 2021-11-26 =
|
133 |
* Added a widget blocks content to replacements.
|
134 |
* Added filter `iworks_orphan_terms` (old one has a typo `iworks_orphan_therms` - but old one stays too).
|
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.8.
|
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.8.2
|
9 |
Author URI: http://iworks.pl/
|
10 |
*/
|
11 |
|