Skip to content

Commit 5e88be7

Browse files
committed
[DONE] Simplify templates – replace all <?php print(...); ?> with <?=…;?>
[DONE] Simplify templates – replace all <?php print(...); ?> with <?=…;?>
1 parent 374d687 commit 5e88be7

File tree

2 files changed

+60
-60
lines changed

2 files changed

+60
-60
lines changed

Test/template.TestInput.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@
6666
<h2>Enter Your Envato Details</h2>
6767
<p>
6868
<label for="envato_username">Your Envato Username:</label><br />
69-
<input name="envato_username" id="envato_username" type="text" value="<?php print($envatoUsername); ?>"
69+
<input name="envato_username" id="envato_username" type="text" value="<?=$envatoUsername;?>"
7070
onfocus="if(this.value === 'YOUR_ENVATO_USERNAME') {this.value=''}"
7171
onblur="if(this.value === ''){this.value ='YOUR_ENVATO_USERNAME'}"
7272
/><br />
7373
<em>(Your username can be found in Envato User Menu -&gt; Profile, i.e. TheGreatUser)</em>
7474
</p>
7575
<p>
7676
<label for="envato_api_key">Your Envato API Key:</label><br />
77-
<input name="envato_api_key" id="envato_api_key" type="text" value="<?php print($envatoAPIKey); ?>"
77+
<input name="envato_api_key" id="envato_api_key" type="text" value="<?=$envatoAPIKey;?>"
7878
onfocus="if(this.value === 'YOUR_ENVATO_API_KEY') {this.value=''}"
7979
onblur="if(this.value === ''){this.value ='YOUR_ENVATO_API_KEY'}"
8080
/><br />
@@ -86,7 +86,7 @@
8686
</p>
8787
<p>
8888
<label for="envato_personal_token">Your Envato Personal Token:</label><br />
89-
<input name="envato_personal_token" id="envato_personal_token" type="text" value="<?php print($envatoPersonalToken); ?>"
89+
<input name="envato_personal_token" id="envato_personal_token" type="text" value="<?=$envatoPersonalToken;?>"
9090
onfocus="if(this.value === 'YOUR_ENVATO_PERSONAL_TOKEN') {this.value=''}"
9191
onblur="if(this.value === ''){this.value ='YOUR_ENVATO_PERSONAL_TOKEN'}"
9292
/><br />
@@ -103,7 +103,7 @@
103103
<h2>1. Get Details About Purchase Code</h2>
104104
<p>
105105
<label for="target_purchase_code">Target Purchase Code:</label><br />
106-
<input type="text" id="target_purchase_code" name="target_purchase_code" value="<?php print($targetPurchaseCode); ?>" /><br />
106+
<input type="text" id="target_purchase_code" name="target_purchase_code" value="<?=$targetPurchaseCode;?>" /><br />
107107
<em>(Leave blank to skip, ex. one of your customer purchase code that you want to validate)</em>
108108
</p>
109109
<div class="clear">&nbsp;</div>
@@ -112,7 +112,7 @@
112112
<h2>2. Get Details About Other Envato User</h2>
113113
<p>
114114
<label for="target_username">Target Username:</label><br />
115-
<input type="text" id="target_username" name="target_username" value="<?php print($targetUsername); ?>" /><br />
115+
<input type="text" id="target_username" name="target_username" value="<?=$targetUsername;?>" /><br />
116116
<em>(Leave blank to skip, ex. &quot;ThemeFusion&quot; - the team behind &quot;Avada&quot; - best-selling theme)</em>
117117
</p>
118118
<div class="clear">&nbsp;</div>
@@ -121,12 +121,12 @@
121121
<h2>3. Check for Update of Plugin You Bought</h2>
122122
<p>
123123
<label for="target_plugin_id">Plugin ID:</label><br />
124-
<input type="text" id="target_plugin_id" name="target_plugin_id" value="<?php print($targetPluginId); ?>" /><br />
124+
<input type="text" id="target_plugin_id" name="target_plugin_id" value="<?=$targetPluginId;?>" /><br />
125125
<em>(Leave blank to skip, ex. &quot;2201708&quot; - ID of &quot;WordPress Social Stream&quot; - best-selling social plugin)</em>
126126
</p>
127127
<p>
128128
<label for="installed_plugin_version">Installed Plugin Version:</label><br />
129-
<input type="text" id="installed_plugin_version" name="installed_plugin_version" value="<?php print($installedPluginVersion); ?>" /><br />
129+
<input type="text" id="installed_plugin_version" name="installed_plugin_version" value="<?=$installedPluginVersion;?>" /><br />
130130
<em>(Leave blank to skip, ex. &quot;1.6.0&quot; - previous version number of &quot;WordPress Social Stream&quot;)</em>
131131
</p>
132132
<div class="clear">&nbsp;</div>
@@ -135,12 +135,12 @@
135135
<h2>4.Check for Update of Theme You Bought</h2>
136136
<p>
137137
<label for="target_theme_id">Theme ID:</label><br />
138-
<input type="text" id="target_theme_id" name="target_theme_id" value="<?php print($targetThemeId); ?>" /><br />
138+
<input type="text" id="target_theme_id" name="target_theme_id" value="<?=$targetThemeId;?>" /><br />
139139
<em>(Leave blank to skip, ex. &quot;2833226&quot; - ID of &quot;Avada&quot; - best-selling theme)</em>
140140
</p>
141141
<p>
142142
<label for="installed_theme_version">Installed Theme Version:</label><br />
143-
<input type="text" id="installed_theme_version" name="installed_theme_version" value="<?php print($installedThemeVersion); ?>" /><br />
143+
<input type="text" id="installed_theme_version" name="installed_theme_version" value="<?=$installedThemeVersion;?>" /><br />
144144
<em>(Leave blank to skip, ex. &quot;3.9.3&quot; - previous version number of &quot;Avada&quot; - best-selling theme)</em>
145145
</p>
146146
<div class="clear">&nbsp;</div>
@@ -149,12 +149,12 @@
149149
<h2>5. Get Envato Item Id of Purchased Plugin</h2>
150150
<p>
151151
<label for="target_plugin_name">Target Plugin Name:</label><br />
152-
<input type="text" id="target_plugin_name" name="target_plugin_name" value="<?php print($targetPluginName); ?>" /><br />
152+
<input type="text" id="target_plugin_name" name="target_plugin_name" value="<?=$targetPluginName;?>" /><br />
153153
<em>(Leave blank to skip, ex. &quot;WordPress Social Stream&quot;)</em>
154154
</p>
155155
<p>
156156
<label for="target_plugin_author">Target Plugin Author:</label><br />
157-
<input type="text" id="target_plugin_author" name="target_plugin_author" value="<?php print($targetPluginAuthor); ?>" /><br />
157+
<input type="text" id="target_plugin_author" name="target_plugin_author" value="<?=$targetPluginAuthor;?>" /><br />
158158
<em>(Leave blank to skip, ex. &quot;Lee Chestnutt&quot; - the Author of &quot;WordPress Social Stream&quot;)</em><br />
159159
<em>(<strong>Note:</strong> Keep in mind that the Envato API here checks ONLY (!) for plugin&#39;s install .php file&#39;s
160160
&quot;Author:&quot; metadata value, and not for Envato Author Username. They can be different.</em>
@@ -165,12 +165,12 @@
165165
<h2>6. Get Envato Item Id of Purchased Theme</h2>
166166
<p>
167167
<label for="target_theme_name">Target Theme Name:</label><br />
168-
<input type="text" id="target_theme_name" name="target_theme_name" value="<?php print($targetThemeName); ?>" /><br />
168+
<input type="text" id="target_theme_name" name="target_theme_name" value="<?=$targetThemeName;?>" /><br />
169169
<em>(Leave blank to skip, ex. &quot;Avada&quot;)</em>
170170
</p>
171171
<p>
172172
<label for="target_theme_author">Target Theme Author:</label><br />
173-
<input type="text" id="target_theme_author" name="target_theme_author" value="<?php print($targetThemeAuthor); ?>" /><br />
173+
<input type="text" id="target_theme_author" name="target_theme_author" value="<?=$targetThemeAuthor;?>" /><br />
174174
<em>(Leave blank to skip, ex. &quot;ThemeFusion&quot; - the Author of &quot;Avada&quot;)</em><br />
175175
<em>(<strong>Note:</strong> Keep in mind that the Envato API here checks ONLY (!) for theme&#39;s style.css file&#39;s
176176
&quot;Author:&quot; metadata value, and not for Envato Author Username. They can be different.</em>

Test/template.TestResults.php

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,23 @@
7676
<h1>Envato Toolkit - Test Results</h1>
7777
<div class="content">
7878
<?php if ($errorMessage != ""): ?>
79-
<div class="info-message error-message"><?php print($errorMessage); ?></div>
79+
<div class="info-message error-message"><?=$errorMessage;?></div>
8080
<?php elseif ($okayMessage != ""): ?>
81-
<div class="info-message okay-message"><?php print($okayMessage); ?></div>
81+
<div class="info-message okay-message"><?=$okayMessage;?></div>
8282
<?php endif; ?>
8383
<div class="results-box">
8484
<h2>Details about you</h2>
8585
<p>
8686
<strong>List of all different plugins you bought:</strong><br />
8787
<?php foreach($plugins AS $pluginId => $plugin): ?>
88-
<?php print('Plugin Id: '.$pluginId.', Name: '.$plugin['name']); ?>, Licenses:<br />
88+
<?='Plugin Id: '.$pluginId.', Name: '.$plugin['name'];?>, Licenses:<br />
8989
<?php foreach($plugin['licenses'] AS $license): ?>
9090
<em>
91-
Code: <?php print($license['purchase_code']); ?>,
92-
Type: <?php print($license['license_type']); ?>,
93-
Purchased: <?php print($license['license_purchase_date']); ?>,
94-
Expires: <?php print($license['support_expiration_date']); ?>,
95-
Status: <?php print($license['support_active'] == 1 ? "Supported" : "Support Expired"); ?>
91+
Code: <?=$license['purchase_code'];?>,
92+
Type: <?=$license['license_type'];?>,
93+
Purchased: <?=$license['license_purchase_date'];?>,
94+
Expires: <?=$license['support_expiration_date'];?>,
95+
Status: <?=$license['support_active'] == 1 ? "Supported" : "Support Expired";?>
9696
</em>
9797
<br />
9898
<?php endforeach; ?>
@@ -102,14 +102,14 @@
102102
<p>
103103
<strong>List of all different themes you bought:</strong><br />
104104
<?php foreach($themes AS $themeId => $theme): ?>
105-
<?php print('Theme Id: '.$themeId.', Name: '.$theme['name']); ?>, Licenses:<br />
105+
<?='Theme Id: '.$themeId.', Name: '.$theme['name'];?>, Licenses:<br />
106106
<?php foreach($theme['licenses'] AS $license): ?>
107107
<em>
108-
Code: <?php print($license['purchase_code']); ?>,
109-
Type: <?php print($license['license_type']); ?>,
110-
Purchased: <?php print($license['license_purchase_date']); ?>,
111-
Expires: <?php print($license['support_expiration_date']); ?>,
112-
Status: <?php print($license['support_active'] == 1 ? "Supported" : "Support Expired"); ?>
108+
Code: <?=$license['purchase_code'];?>,
109+
Type: <?=$license['license_type'];?>,
110+
Purchased: <?=$license['license_purchase_date'];?>,
111+
Expires: <?=$license['support_expiration_date'];?>,
112+
Status: <?=$license['support_active'] == 1 ? "Supported" : "Support Expired";?>
113113
</em>
114114
<br />
115115
<?php endforeach; ?>
@@ -118,9 +118,9 @@
118118
</p>
119119
<p>
120120
<strong>Your summary:</strong><br />
121-
Your location is <strong><?php print($authorCity); ?></strong>, <strong><?php print($authorCountry); ?></strong>.
122-
You&#39;ve sold your items <?php print($authorSales); ?> times
123-
and you have <?php print($authorFollowers); ?> followers on Envato.
121+
Your location is <strong><?=$authorCity;?></strong>, <strong><?=$authorCountry;?></strong>.
122+
You&#39;ve sold your items <?=$authorSales;?> times
123+
and you have <?=$authorFollowers;?> followers on Envato.
124124
</p>
125125
<div class="clear">&nbsp;</div>
126126

@@ -129,40 +129,40 @@
129129
<h2>1. Your Customer&#39;s License Details</h2>
130130
<?php if($showLicenseDetails): ?>
131131
<ul>
132-
<li>Purchase Code: <?php print($targetPurchaseCode); ?></li>
133-
<li>Is Valid License: <?php print($isValidTargetLicense ? 'Yes' : 'No'); ?></li>
134-
<li>Buyer Username: <?php print($targetLicenseBuyer); ?></li>
135-
<li>License Type: <?php print($targetLicenseType); ?></li>
136-
<li>Purchased At: <?php print($targetLicensePurchaseDate); ?></li>
137-
<li>Supported Until: <?php print($targetLicenseSupportExpiration); ?></li>
138-
<li>Status: <?php print($targetLicenseSupportActive == 1 ? "Supported" : "Support Expired"); ?></li>
132+
<li>Purchase Code: <?=$targetPurchaseCode;?></li>
133+
<li>Is Valid License: <?=$isValidTargetLicense ? 'Yes' : 'No';?></li>
134+
<li>Buyer Username: <?=$targetLicenseBuyer;?></li>
135+
<li>License Type: <?=$targetLicenseType;?></li>
136+
<li>Purchased At: <?=$targetLicensePurchaseDate;?></li>
137+
<li>Supported Until: <?=$targetLicenseSupportExpiration;?></li>
138+
<li>Status: <?=$targetLicenseSupportActive == 1 ? "Supported" : "Support Expired";?></li>
139139
</ul>
140140
<?php endif; ?>
141141
<div class="clear">&nbsp;</div>
142142
<?php endif; ?>
143143

144144
<!-- ---------------------------------------------------------- -->
145145
<?php if($targetUsername != ''): ?>
146-
<h2>2. Details About Target Envato User - <?php print($targetUsername); ?></h2>
146+
<h2>2. Details About Target Envato User - <?=$targetUsername;?></h2>
147147
<p>
148-
<strong><?php print($targetUsername); ?></strong> is located in <strong><?php print($targetUserCity); ?></strong>,
149-
<strong><?php print($targetUserCountry); ?></strong>. He sold his items <?php print($targetUserSales); ?> times
150-
and has <?php print($targetUserFollowers); ?> followers on Envato.
148+
<strong><?=$targetUsername;?></strong> is located in <strong><?=$targetUserCity;?></strong>,
149+
<strong><?=$targetUserCountry;?></strong>. He sold his items <?=$targetUserSales;?> times
150+
and has <?=$targetUserFollowers;?> followers on Envato.
151151
</p>
152152
<div class="clear">&nbsp;</div>
153153
<?php endif; ?>
154154

155155
<!-- ---------------------------------------------------------- -->
156156
<?php if($targetPluginId > 0): ?>
157-
<h2>3. Status of Purchased Plugin ID - <?php print($targetPluginId); ?></h2>
157+
<h2>3. Status of Purchased Plugin ID - <?=$targetPluginId;?></h2>
158158
<ul>
159-
<li>Plugin Name: <?php print($nameOfTargetPluginId); ?></li>
160-
<li>Plugin Update Available: <?php print($pluginUpdateAvailable ? 'Yes' : 'No'); ?></li>
161-
<li>Installed Plugin Version: <?php print($installedPluginVersion); ?></li>
162-
<li>Available Plugin Version: <?php print($availablePluginVersion); ?></li>
159+
<li>Plugin Name: <?=$nameOfTargetPluginId;?></li>
160+
<li>Plugin Update Available: <?=$pluginUpdateAvailable ? 'Yes' : 'No';?></li>
161+
<li>Installed Plugin Version: <?=$installedPluginVersion;?></li>
162+
<li>Available Plugin Version: <?=$availablePluginVersion;?></li>
163163
<?php if($pluginUpdateDownloadUrl != ''): ?>
164164
<li>Plugin Update Download URL:
165-
<a href="<?php print($pluginUpdateDownloadUrl); ?>" target="_blank" title="Download newest version">Download newest version</a>
165+
<a href="<?=$pluginUpdateDownloadUrl;?>" target="_blank" title="Download newest version">Download newest version</a>
166166
</li>
167167
<?php endif; ?>
168168
</ul>
@@ -171,15 +171,15 @@
171171

172172
<!-- ---------------------------------------------------------- -->
173173
<?php if($targetThemeId > 0): ?>
174-
<h2>4. Status of Purchased Theme ID - <?php print($targetThemeId); ?></h2>
174+
<h2>4. Status of Purchased Theme ID - <?=$targetThemeId;?></h2>
175175
<ul>
176-
<li>Theme Name: <?php print($nameOfTargetThemeId); ?></li>
177-
<li>Theme Update Available: <?php print($themeUpdateAvailable ? 'Yes' : 'No'); ?></li>
178-
<li>Installed Theme Version: <?php print($installedThemeVersion); ?></li>
179-
<li>Available Theme Version: <?php print($availableThemeVersion); ?></li>
176+
<li>Theme Name: <?=$nameOfTargetThemeId;?></li>
177+
<li>Theme Update Available: <?=$themeUpdateAvailable ? 'Yes' : 'No';?></li>
178+
<li>Installed Theme Version: <?=$installedThemeVersion;?></li>
179+
<li>Available Theme Version: <?=$availableThemeVersion;?></li>
180180
<?php if($themeUpdateDownloadUrl != ''): ?>
181181
<li>Theme Update Download URL:
182-
<a href="<?php print($themeUpdateDownloadUrl); ?>" target="_blank" title="Download newest version">Download newest version</a>
182+
<a href="<?=$themeUpdateDownloadUrl;?>" target="_blank" title="Download newest version">Download newest version</a>
183183
</li>
184184
<?php endif; ?>
185185
</ul>
@@ -190,9 +190,9 @@
190190
<?php if($targetPluginName != '' && $targetPluginAuthor != ''): ?>
191191
<h2>5. Envato Item Id of Purchased Plugin</h2>
192192
<ul>
193-
<li>Searched for Name: <?php print($targetPluginName); ?></li>
194-
<li>Searched for Author: <?php print($targetPluginAuthor); ?></li>
195-
<li>Found Plugin Id: <?php print($foundPluginId); ?></li>
193+
<li>Searched for Name: <?=$targetPluginName;?></li>
194+
<li>Searched for Author: <?=$targetPluginAuthor;?></li>
195+
<li>Found Plugin Id: <?=$foundPluginId;?></li>
196196
</ul>
197197
<div class="clear">&nbsp;</div>
198198
<?php endif; ?>
@@ -201,14 +201,14 @@
201201
<?php if($targetThemeName != '' && $targetThemeAuthor != ''): ?>
202202
<h2>6. Envato Item Id of Purchased Theme</h2>
203203
<ul>
204-
<li>Searched for Name: <?php print($targetThemeName); ?></li>
205-
<li>Searched for Author: <?php print($targetThemeAuthor); ?></li>
206-
<li>Found Theme Id: <?php print($foundThemeId); ?></li>
204+
<li>Searched for Name: <?=$targetThemeName;?></li>
205+
<li>Searched for Author: <?=$targetThemeAuthor;?></li>
206+
<li>Found Theme Id: <?=$foundThemeId;?></li>
207207
</ul>
208208
<?php endif; ?>
209209

210210
<div class="action-buttons">
211-
<button type="submit" class="back-button" onclick="window.location.href='<?php print($goBackUrl); ?>'">Back</button>
211+
<button type="submit" class="back-button" onclick="window.location.href='<?=$goBackUrl;?>'">Back</button>
212212
</div>
213213
</div>
214214
</div>

0 commit comments

Comments
 (0)