updated plugin Connect Matomo version 1.1.5

This commit is contained in:
2026-06-03 21:28:54 +00:00
committed by Gitium
parent 6e8ffa6f66
commit 1f3438440f
78 changed files with 13800 additions and 5314 deletions

View File

@ -1,31 +1,33 @@
<?php
namespace WP_Piwik\Widget;
namespace WP_Piwik\Widget;
class Seo extends \WP_Piwik\Widget {
public $className = __CLASS__;
class Seo extends \WP_Piwik\Widget {
protected function configure($prefix = '', $params = array()) {
$this->parameter = array(
'url' => get_bloginfo('url')
);
$this->title = $prefix.__('SEO', 'wp-piwik');
$this->method = 'SEO.getRank';
}
public function show() {
$response = self::$wpPiwik->request($this->apiID[$this->method]);
if (!empty($response['result']) && $response['result'] ='error')
echo '<strong>'.__('Piwik error', 'wp-piwik').':</strong> '.htmlentities($response['message'], ENT_QUOTES, 'utf-8');
else {
echo '<div class="table"><table class="widefat"><tbody>';
if (is_array($response))
foreach ($response as $val)
echo '<tr><td>'.(isset($val['logo_link']) && !empty($val['logo_link'])?'<a href="'.$val['logo_link'].'" title="'.$val['logo_tooltip'].'">'.$val['label'].'</a>':$val['label']).'</td><td>'.$val['rank'].'</td></tr>';
else echo '<tr><td>SEO module currently not available.</td></tr>';
echo '</tbody></table></div>';
public $class_name = __CLASS__;
protected function configure( $prefix = '', $params = array() ) {
$this->parameter = array(
'url' => get_bloginfo( 'url' ),
);
$this->title = $prefix . __( 'SEO', 'wp-piwik' );
$this->method = 'SEO.getRank';
}
public function show() {
$response = self::$wp_piwik->request( $this->api_id[ $this->method ] );
if ( ! empty( $response['result'] ) && 'error' === $response['result'] ) {
echo '<strong>' . esc_html__( 'Piwik error', 'wp-piwik' ) . ':</strong> ' . esc_html( $response['message'] );
} else {
echo '<div class="table"><table class="widefat"><tbody>';
if ( is_array( $response ) ) {
foreach ( $response as $val ) {
echo '<tr><td>' . ( isset( $val['logo_link'] ) && ! empty( $val['logo_link'] ) ? '<a href="' . esc_attr( $val['logo_link'] ) . '" title="' . esc_attr( $val['logo_tooltip'] ) . '">' . esc_html( $val['label'] ) . '</a>' : esc_html( $val['label'] ) ) . '</td><td>' . esc_html( $val['rank'] ) . '</td></tr>';
}
} else {
echo '<tr><td>SEO module currently not available.</td></tr>';
}
echo '</tbody></table></div>';
}
}
}
}