From ebb579a968c2916bab723186d6f4aee1d3ca34be Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 23 Sep 2009 22:44:30 -0400 Subject: [PATCH] suggested donation amount based on number of transcripts, heh heh --- classes/WhatDidTheySayAdmin.php | 5 +++++ classes/partials/admin.inc | 1 + 2 files changed, 6 insertions(+) diff --git a/classes/WhatDidTheySayAdmin.php b/classes/WhatDidTheySayAdmin.php index 4842dfb..ea86bab 100644 --- a/classes/WhatDidTheySayAdmin.php +++ b/classes/WhatDidTheySayAdmin.php @@ -629,9 +629,14 @@ class WhatDidTheySayAdmin { * Show the admin page. */ function manage_admin() { + global $wpdb; + $options = get_option('what-did-they-say-options'); $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'); } diff --git a/classes/partials/admin.inc b/classes/partials/admin.inc index f0fce3a..8d40809 100644 --- a/classes/partials/admin.inc +++ b/classes/partials/admin.inc @@ -35,6 +35,7 @@

Version is © 2009 . +