suggested donation amount based on number of transcripts, heh heh

This commit is contained in:
John Bintz 2009-09-23 22:44:30 -04:00
parent c33591d747
commit ebb579a968
2 changed files with 6 additions and 0 deletions

View File

@ -629,9 +629,14 @@ class WhatDidTheySayAdmin {
* Show the admin page. * Show the admin page.
*/ */
function manage_admin() { function manage_admin() {
global $wpdb;
$options = get_option('what-did-they-say-options'); $options = get_option('what-did-they-say-options');
$nonce = wp_create_nonce('what-did-they-say'); $nonce = wp_create_nonce('what-did-they-say');
$suggested_amount = 20 + ((int)$wpdb->get_var($wpdb->prepare("SELECT count($wpdb->postmeta.meta_key) FROM $wpdb->postmeta WHERE $wpdb->postmeta.meta_key = 'approved_transcripts'")) * 0.1);
include('partials/admin.inc'); include('partials/admin.inc');
} }

View File

@ -35,6 +35,7 @@
<p> <p>
<a href="<?php echo $PluginURI ?>"><?php _e('What Did They Say?!?', 'what-did-they-say') ?></a> Version <?php echo $Version ?> is &copy; 2009 <?php echo $Author ?>. <a href="<?php echo $PluginURI ?>"><?php _e('What Did They Say?!?', 'what-did-they-say') ?></a> Version <?php echo $Version ?> is &copy; 2009 <?php echo $Author ?>.
<?php printf(__('Might I suggest a $%0.2f donation?', 'what-did-they-say'), $suggested_amount) ?>
</p> </p>
</div> </div>
</div> </div>