Skip to content

Commit f0b52fc

Browse files
author
André Bräkling
committed
* Encode plugin display name directly after saving
* Remove outdated donation options
1 parent 200d591 commit f0b52fc

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

classes/WP_Piwik/Admin/Settings.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,6 @@ private function showDonation() {
532532
<p>
533533
<?php _e('If you like WP-Matomo, you can support its development by a donation:', 'wp-piwik'); ?>
534534
</p>
535-
<div>
536-
<script id='fb0ahsp'>(function(i){var f,s=document.getElementById(i);f=document.createElement('iframe');f.src='//button.flattr.com/view/?fid=mkdp7z&url=https%3A%2F%2Fwww.braekling.de%2Fwp-piwik-wpmu-piwik-wordpress';f.title='Flattr';f.height=62;f.width=55;f.style.borderWidth=0;s.parentNode.insertBefore(f,s);})('fb0ahsp');</script>
537-
</div>
538535
<div>
539536
Paypal
540537
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
@@ -551,9 +548,6 @@ private function showDonation() {
551548
<div>
552549
<a href="http://www.amazon.de/gp/registry/wishlist/111VUJT4HP1RA?reveal=unpurchased&amp;filter=all&amp;sort=priority&amp;layout=standard&amp;x=12&amp;y=14"><?php _e('My Amazon.de wishlist', 'wp-piwik'); ?></a>
553550
</div>
554-
<div>
555-
<?php _e('Please don\'t forget to vote the compatibility at the','wp-piwik'); ?> <a target="_BLANK" href="http://wordpress.org/extend/plugins/wp-piwik/">WordPress.org Plugin Directory</a>.
556-
</div>
557551
</div><?php
558552
}
559553

classes/WP_Piwik/Settings.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,8 @@ public function save() {
148148
return;
149149
}
150150
self::$wpPiwik->log ( 'Save settings' );
151+
$this->globalSettings['plugin_display_name'] = htmlspecialchars($this->globalSettings['plugin_display_name'], ENT_QUOTES, 'utf-8');
151152
foreach ( $this->globalSettings as $key => $value ) {
152-
if ($key == "plugin_display_name") {
153-
$value = htmlentities($value, ENT_QUOTES, 'utf-8');
154-
}
155153
if ( $this->checkNetworkActivation() )
156154
update_site_option ( 'wp-piwik_global-' . $key, $value );
157155
else

0 commit comments

Comments
 (0)