Version Description
- 2022-04-21 =
- Added Transients API to avoid multiple read from
terms.txtfile. - Removed unused method
add_help_tab().
Download this release
Release Info
| Developer | iworks |
| Plugin | |
| Version | 3.0.0 |
| Comparing to | |
| See all releases | |
Code changes from version 2.9.11 to 3.0.0
- includes/iworks/class-iworks-orphan.php +30 -27
- languages/sierotki.pot +2 -26
- readme.txt +6 -2
- sierotki.php +1 -1
includes/iworks/class-iworks-orphan.php
CHANGED
|
@@ -43,6 +43,13 @@ class iworks_orphan {
|
|
| 43 |
*/
|
| 44 |
private $meta_keys = null;
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
public function __construct() {
|
| 47 |
/**
|
| 48 |
* basic settings
|
|
@@ -293,33 +300,6 @@ class iworks_orphan {
|
|
| 293 |
return $content;
|
| 294 |
}
|
| 295 |
|
| 296 |
-
/**
|
| 297 |
-
* Add Hlp tab on option page
|
| 298 |
-
*/
|
| 299 |
-
public function add_help_tab() {
|
| 300 |
-
$screen = get_current_screen();
|
| 301 |
-
if ( $screen->id != $this->admin_page ) {
|
| 302 |
-
return;
|
| 303 |
-
}
|
| 304 |
-
// Add my_help_tab if current screen is My Admin Page
|
| 305 |
-
$screen->add_help_tab(
|
| 306 |
-
array(
|
| 307 |
-
'id' => 'overview',
|
| 308 |
-
'title' => __( 'Orphans', 'sierotki' ),
|
| 309 |
-
'content' => '<p>' . __( 'Plugin fix some Polish gramary rules with orphans.', 'sierotki' ) . '</p>',
|
| 310 |
-
)
|
| 311 |
-
);
|
| 312 |
-
/**
|
| 313 |
-
* make sidebar help
|
| 314 |
-
*/
|
| 315 |
-
$screen->set_help_sidebar(
|
| 316 |
-
'<p><strong>' . __( 'For more information:' ) . '</strong></p>' .
|
| 317 |
-
'<p>' . __( '<a href="http://wordpress.org/extend/plugins/sierotki/" target="_blank">Plugin Homepage</a>', 'sierotki' ) . '</p>' .
|
| 318 |
-
'<p>' . __( '<a href="http://wordpress.org/support/plugin/sierotki/" target="_blank">Support Forums</a>', 'sierotki' ) . '</p>' .
|
| 319 |
-
'<p>' . __( '<a href="http://iworks.pl/en/" target="_blank">break the web</a>', 'sierotki' ) . '</p>'
|
| 320 |
-
);
|
| 321 |
-
}
|
| 322 |
-
|
| 323 |
/**
|
| 324 |
* Inicialize admin area
|
| 325 |
*/
|
|
@@ -520,6 +500,19 @@ class iworks_orphan {
|
|
| 520 |
* @return $terms array Array of terms to replace.
|
| 521 |
*/
|
| 522 |
private function _terms() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 523 |
if ( ! empty( $this->terms ) ) {
|
| 524 |
$terms = $this->terms;
|
| 525 |
$terms = apply_filters( 'iworks_orphan_therms', $terms );
|
|
@@ -583,6 +576,16 @@ class iworks_orphan {
|
|
| 583 |
*/
|
| 584 |
$terms = apply_filters( 'iworks_orphan_therms', $terms );
|
| 585 |
$terms = apply_filters( 'iworks_orphan_terms', $terms );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 586 |
return $terms;
|
| 587 |
}
|
| 588 |
|
| 43 |
*/
|
| 44 |
private $meta_keys = null;
|
| 45 |
|
| 46 |
+
/**
|
| 47 |
+
* Filter post meta.
|
| 48 |
+
*
|
| 49 |
+
* @since 3.0.0
|
| 50 |
+
*/
|
| 51 |
+
private $version = '3.0.0';
|
| 52 |
+
|
| 53 |
public function __construct() {
|
| 54 |
/**
|
| 55 |
* basic settings
|
| 300 |
return $content;
|
| 301 |
}
|
| 302 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 303 |
/**
|
| 304 |
* Inicialize admin area
|
| 305 |
*/
|
| 500 |
* @return $terms array Array of terms to replace.
|
| 501 |
*/
|
| 502 |
private function _terms() {
|
| 503 |
+
/**
|
| 504 |
+
* Transients
|
| 505 |
+
*
|
| 506 |
+
* @since 3.0.0
|
| 507 |
+
*/
|
| 508 |
+
$cache_name = 'orphan_terms' . $this->version;
|
| 509 |
+
$terms = get_transient( $cache_name );
|
| 510 |
+
if ( ! empty( $terms ) ) {
|
| 511 |
+
$this->terms = $terms;
|
| 512 |
+
}
|
| 513 |
+
/**
|
| 514 |
+
* if already set
|
| 515 |
+
*/
|
| 516 |
if ( ! empty( $this->terms ) ) {
|
| 517 |
$terms = $this->terms;
|
| 518 |
$terms = apply_filters( 'iworks_orphan_therms', $terms );
|
| 576 |
*/
|
| 577 |
$terms = apply_filters( 'iworks_orphan_therms', $terms );
|
| 578 |
$terms = apply_filters( 'iworks_orphan_terms', $terms );
|
| 579 |
+
/**
|
| 580 |
+
* Transients
|
| 581 |
+
*
|
| 582 |
+
* @since 3.0.0
|
| 583 |
+
*/
|
| 584 |
+
set_transient( $cache_name, $terms, DAY_IN_SECONDS );
|
| 585 |
+
/**
|
| 586 |
+
* set
|
| 587 |
+
*/
|
| 588 |
+
$this->terms = $terms;
|
| 589 |
return $terms;
|
| 590 |
}
|
| 591 |
|
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-dev\n"
|
| 7 |
-
"POT-Creation-Date: 2022-04-05
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
|
@@ -224,31 +224,7 @@ msgstr ""
|
|
| 224 |
msgid "WordPress Help Forum"
|
| 225 |
msgstr ""
|
| 226 |
|
| 227 |
-
#: includes/iworks/class-iworks-orphan.php:
|
| 228 |
-
msgid "Plugin fix some Polish gramary rules with orphans."
|
| 229 |
-
msgstr ""
|
| 230 |
-
|
| 231 |
-
#: includes/iworks/class-iworks-orphan.php:316
|
| 232 |
-
msgid "For more information:"
|
| 233 |
-
msgstr ""
|
| 234 |
-
|
| 235 |
-
#: includes/iworks/class-iworks-orphan.php:317
|
| 236 |
-
msgid ""
|
| 237 |
-
"<a href=\"http://wordpress.org/extend/plugins/sierotki/\" "
|
| 238 |
-
"target=\"_blank\">Plugin Homepage</a>"
|
| 239 |
-
msgstr ""
|
| 240 |
-
|
| 241 |
-
#: includes/iworks/class-iworks-orphan.php:318
|
| 242 |
-
msgid ""
|
| 243 |
-
"<a href=\"http://wordpress.org/support/plugin/sierotki/\" "
|
| 244 |
-
"target=\"_blank\">Support Forums</a>"
|
| 245 |
-
msgstr ""
|
| 246 |
-
|
| 247 |
-
#: includes/iworks/class-iworks-orphan.php:319
|
| 248 |
-
msgid "<a href=\"http://iworks.pl/en/\" target=\"_blank\">break the web</a>"
|
| 249 |
-
msgstr ""
|
| 250 |
-
|
| 251 |
-
#: includes/iworks/class-iworks-orphan.php:467
|
| 252 |
#: includes/iworks/rate/rate.php:124
|
| 253 |
msgid "Settings"
|
| 254 |
msgstr ""
|
| 4 |
msgstr ""
|
| 5 |
"Project-Id-Version: Orphans PLUGIN_VERSION\n"
|
| 6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/sierotki-dev\n"
|
| 7 |
+
"POT-Creation-Date: 2022-04-21 05:38:08+00:00\n"
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
| 224 |
msgid "WordPress Help Forum"
|
| 225 |
msgstr ""
|
| 226 |
|
| 227 |
+
#: includes/iworks/class-iworks-orphan.php:447
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 228 |
#: includes/iworks/rate/rate.php:124
|
| 229 |
msgid "Settings"
|
| 230 |
msgstr ""
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Donate link: https://ko-fi.com/iworks?utm_source=sierotki&utm_medium=readme-dona
|
|
| 4 |
Tags: sierotka, sierotki, spójniki, twarda spacja
|
| 5 |
Requires at least: 4.6
|
| 6 |
Tested up to: 6.0
|
| 7 |
-
Stable tag:
|
| 8 |
|
| 9 |
|
| 10 |
|
|
@@ -128,8 +128,12 @@ function remove_iworks_orphan_terms( $terms ) {
|
|
| 128 |
|
| 129 |
== Changelog ==
|
| 130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
= 2.9.11 - 2022-04-05 =
|
| 132 |
-
* Updated iWorks Options to 2.8.3. Fixed
|
| 133 |
|
| 134 |
= 2.9.10 - 2022-04-05 =
|
| 135 |
* Updated iWorks Options to 2.8.3.
|
| 4 |
Tags: sierotka, sierotki, spójniki, twarda spacja
|
| 5 |
Requires at least: 4.6
|
| 6 |
Tested up to: 6.0
|
| 7 |
+
Stable tag: 3.0.0
|
| 8 |
|
| 9 |
|
| 10 |
|
| 128 |
|
| 129 |
== Changelog ==
|
| 130 |
|
| 131 |
+
= 3.0.0 - 2022-04-21 =
|
| 132 |
+
* Added Transients API to avoid multiple read from `terms.txt` file.
|
| 133 |
+
* Removed unused method `add_help_tab()`.
|
| 134 |
+
|
| 135 |
= 2.9.11 - 2022-04-05 =
|
| 136 |
+
* Updated iWorks Options to 2.8.3. (Fixed PHP 7.x compatibility).
|
| 137 |
|
| 138 |
= 2.9.10 - 2022-04-05 =
|
| 139 |
* Updated iWorks Options to 2.8.3.
|
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:
|
| 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: 3.0.0
|
| 9 |
Author URI: http://iworks.pl/
|
| 10 |
*/
|
| 11 |
|
