Skip to content

Commit

Permalink
Update to JUPWA v1.28
Browse files Browse the repository at this point in the history
  • Loading branch information
denysdesign committed Feb 19, 2024
1 parent 6416e5f commit 11ffc6c
Show file tree
Hide file tree
Showing 10 changed files with 361 additions and 353 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## Download

[JUPWA v 1.27](https://github.com/Joomla-Ukraine/JUPWA/releases/download/1.27/pkg_jupwa_v1.27.zip)
[JUPWA v 1.28](https://github.com/Joomla-Ukraine/JUPWA/releases/download/1.28/pkg_jupwa_v1.28.zip)

## Integration

Expand Down
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
basedir=".">

<property name="VERSION"
value="1.27" />
value="1.28" />
<property name="JOOMLA"
value="4.0" />

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jupwa",
"sideEffects": true,
"version": "1.3",
"version": "1.5",
"description": "JUPWA",
"private": true,
"scripts": {
Expand Down
33 changes: 32 additions & 1 deletion packages/plg_system_jupwa/jupwa.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ public function onAfterDispatch(): void
if($this->params->get('usepwainstall') == 1)
{
$wa = $doc->getWebAssetManager();
$jupwa_install_version = '1.3';
$jupwa_install_version = '1.5';

$wa->registerAndUseScript('jupwa', Uri::root() . 'media/jupwa/js/jupwa.' . $jupwa_install_version . '.js', [ 'version' => false ], [
'defer' => 'defer',
Expand Down Expand Up @@ -340,6 +340,37 @@ public function onBeforeCompileHead()
return true;
}

if($integration === null)
{
$image = $this->coreTags()->image;
$title = $this->coreTags()->title;
$description = $this->coreTags()->description;
$img = $this->coreTags($image)->img;

if($this->params->get('og') == 1)
{
OG::tag([
'params' => $this->params,
'type' => 'website',
'title' => $title,
'image' => $img->image,
'image_width' => $img->width,
'image_height' => $img->height,
'description' => $description
]);
}

if($this->params->get('tw') == 1)
{
OG::twitter([
'params' => $this->params,
'title' => $title,
'image' => $image,
'description' => $description
]);
}
}

// Integration
$this->app->triggerEvent('onJUPWASchema');

Expand Down
2 changes: 2 additions & 0 deletions packages/plg_system_jupwa/libraries/src/Helpers/OG.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public static function tag(array $option = [], array $parameters = []): void
$doc->setMetaData('og:image:width', $option[ 'image_width' ], 'property');
$doc->setMetaData('og:image:height', $option[ 'image_height' ], 'property');
}

$doc->setMetaData('og:image:alt', $option[ 'title' ], 'property');
}

foreach($parameters as $k => $v)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'joomla-ua/jupwa',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '2f6d2ab794a0a4ec8387c4c967d80f3c2b23a9cb',
'reference' => '6416e5f6c4be1b27a498e590ea62908ac7312f54',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -31,7 +31,7 @@
'joomla-ua/jupwa' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '2f6d2ab794a0a4ec8387c4c967d80f3c2b23a9cb',
'reference' => '6416e5f6c4be1b27a498e590ea62908ac7312f54',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down
2 changes: 0 additions & 2 deletions packages/plg_system_jupwa/media/jupwa/js/jupwa.1.3.js

This file was deleted.

1 change: 1 addition & 0 deletions packages/plg_system_jupwa/media/jupwa/js/jupwa.1.5.js

Large diffs are not rendered by default.

Loading

0 comments on commit 11ffc6c

Please sign in to comment.