add donate and footer and pretty things up
This commit is contained in:
parent
0a3d94837a
commit
180646a3ca
@ -536,7 +536,7 @@ class WhatDidTheySayAdmin {
|
|||||||
function admin_menu() {
|
function admin_menu() {
|
||||||
global $plugin_page;
|
global $plugin_page;
|
||||||
|
|
||||||
if (current_user_can('submit_transcriptions')) {
|
if (current_user_can('submit_transcriptions')) {
|
||||||
add_options_page(
|
add_options_page(
|
||||||
__('What Did They Say?!?', 'what-did-they-say'),
|
__('What Did They Say?!?', 'what-did-they-say'),
|
||||||
__('What Did They Say?!?', 'what-did-they-say'),
|
__('What Did They Say?!?', 'what-did-they-say'),
|
||||||
@ -548,6 +548,8 @@ class WhatDidTheySayAdmin {
|
|||||||
if ($plugin_page == "manage-wdts") {
|
if ($plugin_page == "manage-wdts") {
|
||||||
$this->read_language_file();
|
$this->read_language_file();
|
||||||
wp_enqueue_style('wdts-admin', plugin_dir_url(dirname(__FILE__)) . 'css/wdts-admin.css');
|
wp_enqueue_style('wdts-admin', plugin_dir_url(dirname(__FILE__)) . 'css/wdts-admin.css');
|
||||||
|
|
||||||
|
$this->plugin_data = get_plugin_data($this->_parent_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
wp_enqueue_script('scriptaculous-effects');
|
wp_enqueue_script('scriptaculous-effects');
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
'misc-options' => __('Misc. Options', 'what-did-they-say'),
|
'misc-options' => __('Misc. Options', 'what-did-they-say'),
|
||||||
'shortcodes-info' => __('Shortcodes Info', 'what-did-they-say')
|
'shortcodes-info' => __('Shortcodes Info', 'what-did-they-say')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
extract($this->plugin_data);
|
||||||
?>
|
?>
|
||||||
<div class="wrap">
|
<div class="wrap">
|
||||||
<h2><?php _e('What Did They Say?!?', 'what-did-they-say') ?></h2>
|
<h2><?php _e('What Did They Say?!?', 'what-did-they-say') ?></h2>
|
||||||
@ -21,6 +23,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="wdts-footer">
|
||||||
|
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="donate">
|
||||||
|
<input type="hidden" name="cmd" value="_s-xclick">
|
||||||
|
<input type="hidden" name="hosted_button_id" value="8429526">
|
||||||
|
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
||||||
|
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="<?php echo $PluginURI ?>"><?php _e('What Did They Say?!?', 'what-did-they-say') ?></a> Version <?php echo $Version ?> is © 2009 <?php echo $Author ?>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
@ -37,4 +37,19 @@
|
|||||||
|
|
||||||
#wdts-container dd {
|
#wdts-container dd {
|
||||||
margin-left: 4em
|
margin-left: 4em
|
||||||
|
}
|
||||||
|
|
||||||
|
#wdts-footer {
|
||||||
|
height: 3em;
|
||||||
|
overflow: hidden
|
||||||
|
}
|
||||||
|
|
||||||
|
#wdts-footer p {
|
||||||
|
margin: 0;
|
||||||
|
line-height: 3em
|
||||||
|
}
|
||||||
|
|
||||||
|
#wdts-footer form {
|
||||||
|
float: right;
|
||||||
|
display: inline
|
||||||
}
|
}
|
@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||||||
foreach (glob(dirname(__FILE__) . '/classes/*.php') as $file) { require_once($file); }
|
foreach (glob(dirname(__FILE__) . '/classes/*.php') as $file) { require_once($file); }
|
||||||
|
|
||||||
$what_did_they_say_admin = new WhatDidTheySayAdmin(&$what_did_they_say);
|
$what_did_they_say_admin = new WhatDidTheySayAdmin(&$what_did_they_say);
|
||||||
|
$what_did_they_say_admin->_parent_file = __FILE__;
|
||||||
|
|
||||||
add_action('init', array(&$what_did_they_say_admin, 'init'));
|
add_action('init', array(&$what_did_they_say_admin, 'init'));
|
||||||
|
|
||||||
@ -43,18 +44,22 @@ add_action('init', array(&$what_did_they_say_admin, 'init'));
|
|||||||
* @return string|false The transcript in the requested language for the specified post, or false if no transcript found.
|
* @return string|false The transcript in the requested language for the specified post, or false if no transcript found.
|
||||||
*/
|
*/
|
||||||
function get_the_media_transcript($language = null) {
|
function get_the_media_transcript($language = null) {
|
||||||
global $post, $what_did_they_say;
|
global $post;
|
||||||
|
|
||||||
if (is_null($language)) { $language = $what_did_they_say->get_default_language(); }
|
if (!empty($post)) {
|
||||||
|
$language_options = new WDTSLanguageOptions();
|
||||||
$transcript = false;
|
if (is_null($language)) { $language = $language_options->get_default_language(); }
|
||||||
$approved_transcripts = new WDTSApprovedTranscript($post->ID);
|
|
||||||
$transcripts = $approved_transcripts->get_transcripts();
|
$transcript = false;
|
||||||
|
$approved_transcripts = new WDTSApprovedTranscript($post->ID);
|
||||||
if (!empty($transcripts)) {
|
$transcripts = $approved_transcripts->get_transcripts();
|
||||||
if (isset($transcripts[$language])) { $transcript = $transcripts[$language]; }
|
|
||||||
|
if (!empty($transcripts)) {
|
||||||
|
if (isset($transcripts[$language])) { $transcript = $transcripts[$language]; }
|
||||||
|
}
|
||||||
|
return $transcript;
|
||||||
}
|
}
|
||||||
return $transcript;
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user