Skip to content

Commit

Permalink
Incorporate submit_button(), and minor tweak to GitHub API
Browse files Browse the repository at this point in the history
  • Loading branch information
chipbennett committed Jul 25, 2011
1 parent c1942cf commit 67d8120
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 6 deletions.
6 changes: 3 additions & 3 deletions functions/options.php
Expand Up @@ -1170,7 +1170,7 @@ function oenology_admin_options_page() {
<div class="wrap">
<?php oenology_admin_options_page_tabs(); ?>
<?php if ( isset( $_GET['settings-updated'] ) ) {
echo "<div class='updated'><p>' . __( 'Theme settings updated successfully.', 'oenology' ) . '</p></div>";
echo '<div class="updated"><p>' . __( 'Theme settings updated successfully.', 'oenology' ) . '</p></div>';
} ?>
<form action="options.php" method="post">
<?php
Expand All @@ -1179,8 +1179,8 @@ function oenology_admin_options_page() {

$tab = ( isset( $_GET['tab'] ) ? $_GET['tab'] : 'general' );
?>
<input name="theme_oenology_options[submit-<?php echo $tab; ?>]" type="submit" class="button-primary" value="Save Settings" />
<input name="theme_oenology_options[reset-<?php echo $tab; ?>]" type="submit" class="button-secondary" value="Reset Defaults" />
<?php submit_button( __( 'Save Settings', 'oenology' ), 'primary', 'theme_oenology_options[submit-' . $tab . ']', false ); ?>
<?php submit_button( __( 'Reset Defaults', 'oenology' ), 'secondary', 'theme_oenology_options[reset-' . $tab . ']', false ); ?>
</form>
</div>
<?php
Expand Down
6 changes: 5 additions & 1 deletion functions/reference.php
Expand Up @@ -143,6 +143,10 @@ function oenology_contextual_help_reference( $contextual_help, $screen_id, $scre
* Uses the GitHub API (v3) to get information
* regarding open or closed issues (bug reports)
* or commits, then outputs them in a table.
*
* Derived from code originally developed by
* Michael Fields (@_mfields):
* @link https://gist.github.com/1061846 Simple Github commit API shortcode for WordPress
*
* @param string $context (required) API data context. Currently supports 'commits' and 'issues'. Default: 'commits'
* @param string $status (optional) Issue state, either 'open' or 'closed'. Only used for 'commits' context. Default: 'open'
Expand Down Expand Up @@ -214,7 +218,7 @@ function oenology_get_github_api_data( $context = 'commits', $status = 'open', $

// If the decoded json data is null, return a message
// indicating that no data were returned.
if ( ! isset( $data ) ) {
if ( ! isset( $data ) || empty( $data ) ) {
$apidata = $context;
if ( 'issues' == $context ) {
$apidata = $status . ' ' . $context;
Expand Down
Binary file modified languages/en_US.mo
Binary file not shown.
25 changes: 23 additions & 2 deletions languages/oenology.po
Expand Up @@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: oenology\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2011-07-19 09:31-0600\n"
"PO-Revision-Date: 2011-07-19 09:31-0600\n"
"POT-Creation-Date: 2011-07-25 11:11-0600\n"
"PO-Revision-Date: 2011-07-25 11:12-0600\n"
"Last-Translator: Chip Bennett <chip@chipbennett.net>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -700,6 +700,27 @@ msgstr "Gray"
msgid "Coffee"
msgstr "Coffee"

#: U:\My
#: Documents\My
#: Dropbox\Development\git\oenology\master/functions/options.php:1173
#: Dropbox\Development\git\oenology\master\functions/options.php:1173
msgid "Theme settings updated successfully."
msgstr "Theme settings updated successfully."

#: U:\My
#: Documents\My
#: Dropbox\Development\git\oenology\master/functions/options.php:1182
#: Dropbox\Development\git\oenology\master\functions/options.php:1182
msgid "Save Settings"
msgstr "Save Settings"

#: U:\My
#: Documents\My
#: Dropbox\Development\git\oenology\master/functions/options.php:1183
#: Dropbox\Development\git\oenology\master\functions/options.php:1183
msgid "Reset Defaults"
msgstr "Reset Defaults"

#: U:\My
#: Documents\My
#: Dropbox\Development\git\oenology\master/functions/widgets.php:437
Expand Down

0 comments on commit 67d8120

Please sign in to comment.