Skip to content

Commit 97c12c2

Browse files
Plugin refactoring. Version updated
1 parent dbebeba commit 97c12c2

5 files changed

Lines changed: 139 additions & 112 deletions

File tree

includes/lists-page.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@
2626
$api_key = (defined('MAILGUN_APIKEY') && MAILGUN_APIKEY) ? MAILGUN_APIKEY : $this->get_option('apiKey');
2727
$mailgun_domain = (defined('MAILGUN_DOMAIN') && MAILGUN_DOMAIN) ? MAILGUN_DOMAIN : $this->get_option('domain');
2828

29-
30-
if ($api_key != ''):
31-
if ($mailgun_domain == ''):
29+
if ($api_key != '') {
30+
if ($mailgun_domain == '') {
3231
$missing_error = '<strong style="color:red;">Missing or invalid Mailgun Domain</strong>. ';
33-
endif;
34-
else:
32+
}
33+
} else {
3534
$missing_error = '<strong style="color:red;">Missing or invalid API Key</strong>. ';
36-
endif;
35+
}
3736

3837
// import available lists
3938
$lists_arr = $mailgun->get_lists();
39+
$icon = $mailgun->getAssetsPath() . 'icon-128x128.png';
4040

4141
?>
4242

@@ -46,7 +46,7 @@
4646

4747
<span class="alignright">
4848
<a target="_blank" href="http://www.mailgun.com/">
49-
<img src="https://assets.mailgun.com/img/mailgun.svg" alt="Mailgun" style="width: 10em;"/>
49+
<img src="<?php echo $icon?>" alt="Mailgun" style="width: 50px;"/>
5050
</a>
5151
</span>
5252

includes/options-page.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
2020
*/
2121

22+
global $mailgun;
23+
2224
$mailgun_domain_const = ((defined('MAILGUN_DOMAIN') && MAILGUN_DOMAIN) ? MAILGUN_DOMAIN : null);
2325
$mailgun_domain = $mailgun_domain_const ? $mailgun_domain_const : $this->get_option('domain');
2426

@@ -48,14 +50,14 @@
4850

4951
$mailgun_use_api_const = (defined('MAILGUN_USEAPI') ? MAILGUN_USEAPI : null);
5052
$mailgun_use_api = !is_null($mailgun_use_api_const) ? ((string)(1 * $mailgun_use_api_const)) : $this->get_option('useAPI');
51-
53+
$icon = $mailgun->getAssetsPath() . 'icon-128x128.png';
5254

5355
?>
5456
<div class="wrap">
5557
<div id="icon-options-general" class="icon32"><br/></div>
5658
<span class="alignright">
5759
<a target="_blank" href="http://www.mailgun.com/">
58-
<img src="https://assets.mailgun.com/img/mailgun.svg" alt="Mailgun" style="width:10em;"/>
60+
<img src="<?php echo $icon?>" alt="Mailgun" style="width:50px;"/>
5961
</a>
6062
</span>
6163
<h2><?php _e('Mailgun', 'mailgun'); ?></h2>

0 commit comments

Comments
 (0)