Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibin Grasic committed Mar 23, 2020
1 parent d31bc5d commit 1f3ef0f
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 10 deletions.
10 changes: 10 additions & 0 deletions lib/Core/Compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
get_stl_config,
get_script
};

use function SGI\STL\Frontend\Utils\script_selector;

use const SGI\STL\DOMAIN;

/**
Expand Down Expand Up @@ -119,4 +122,11 @@ function stl_get_script_identifier()

return get_stl_config()['core']['param'];

}

function stl_show_selector($p_selection_type = 'oneline', $p_oneline_separator = ' | ', $p_cirilica_title = 'ћирилица', $p_latinica_title = 'латиница', $p_inactive_script_only = false, $p_show_only_on_wpml_languages = '')
{

script_selector($p_selection_type, $p_oneline_separator, $p_cirilica_title, $p_latinica_title, $p_inactive_script_only, $p_show_only_on_wpml_languages);

}
2 changes: 1 addition & 1 deletion lib/Shortcode/Cyrilizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __construct()

}

public function shortcode_callback($atts, ?string $content)
public function shortcode_callback($atts, $content)
{

$script = get_script();
Expand Down
4 changes: 2 additions & 2 deletions lib/Shortcode/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function __construct()

}

public function multicode_callback($atts, ?string $content, ?string $shortcode)
public function multicode_callback($atts, $content, $shortcode)
{

switch ($shortcode) :
Expand Down Expand Up @@ -67,7 +67,7 @@ public function multicode_callback($atts, ?string $content, ?string $shortcode)

}

public function shortcode_callback($atts, ?string $content)
public function shortcode_callback($atts, $content)
{

shortcode_atts([
Expand Down
2 changes: 1 addition & 1 deletion lib/Shortcode/Legacy.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trait Legacy

private $name;

public function legacy_callback($atts, ?string $content)
public function legacy_callback($atts, string $content)
{

trigger_error(
Expand Down
2 changes: 1 addition & 1 deletion lib/Shortcode/Multicode.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
interface Multicode
{

public function multicode_callback($atts, ?string $content, ?string $shortcode);
public function multicode_callback($atts, $content, $shortcode);
}
4 changes: 2 additions & 2 deletions lib/Shortcode/Selective_Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function __construct()

}

public function multicode_callback($atts, ?string $content, ?string $shortcode)
public function multicode_callback($atts, $content, $shortcode)
{

$atts = ($shortcode == 'stl_cyrillic') ? ['script' => 'cir'] : ['script' => 'lat'];
Expand All @@ -25,7 +25,7 @@ public function multicode_callback($atts, ?string $content, ?string $shortcode)

}

public function shortcode_callback($atts, ?string $content)
public function shortcode_callback($atts, $content)
{

shortcode_atts([
Expand Down
3 changes: 2 additions & 1 deletion lib/Shortcode/Shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
interface Shortcode
{

public function shortcode_callback($atts, ?string $content);
public function shortcode_callback($atts, $content);

}
2 changes: 1 addition & 1 deletion lib/Shortcode/Translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct()

}

public function shortcode_callback($atts, ?string $content)
public function shortcode_callback($atts, $content)
{

shortcode_atts([
Expand Down
2 changes: 1 addition & 1 deletion lib/Update/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private function migrate_legacy_stl()
{

$this->stl['core']['script'] = $this->stl_old['stl_default_language'];
$this->stl['core']['cookie'] = $this->stl_old['stl_use_cookie'];
$this->stl['core']['cookie'] = true;
$this->stl['core']['param'] = $this->stl_old['stl_lang_identificator'];
$this->stl['file']['names'] = ($this->stl_old['stl_sanitize_file_names']) ? true : false;
$this->stl['file']['delim'] = $this->stl_old['file_lang_delimiter'];
Expand Down
7 changes: 7 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ Feel free to contact me via e-mail, and I'll see if I can assist you for your sp

== Changelog ==

= 2.0.2 =

Bug Fixes:
* Fixed PHP Fatal Error on certain hosting configurations
* Fixed PHP notices on certaing PHP configurations
* Fixed legacy script selector function

= 2.0.1 =
Release date: March 22nd, 2020

Expand Down

0 comments on commit 1f3ef0f

Please sign in to comment.