Skip to content

Commit

Permalink
Refine the wordpress settings interface, adding limited styles and an…
Browse files Browse the repository at this point in the history
… introduction paragraph.
  • Loading branch information
jpederson committed May 20, 2019
1 parent f1c57d6 commit d5fa127
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions wordpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ function ta_options_page() {

?>
<h2>Twitter Aggregator Settings</h2>
<p>Enter your Twitter API key and oAuth settings generated at <a href="https://dev.twitter.com/apps/new" target="_blank">https://dev.twitter.com/apps/new</a>, and provide a comma-separated list of twitter handles for the tool to fetch.</p>
<hr>
<style>.ta-field { padding: 5px 10px; min-width: 280px; width: 60%; }</style>
<form method="post" action="options.php">
<?php

Expand All @@ -95,8 +98,8 @@ function ta_options_page() {
// loop through the options and output fields.
foreach ( $ta_options as $opt ) {
?>
<p><label for="<?php print $opt ?>"><?php print ucwords( str_replace( "ta_", "", str_replace( "_", " ", $opt ) ) ); ?></label><br>
<input type="text" id="<?php print $opt; ?>" name="<?php print $opt; ?>" value="<?php echo get_option( $opt ); ?>" /></p>
<p><label for="<?php print $opt ?>"><?php print ucwords( str_replace( "_", " ", str_replace( "ta_", "", $opt ) ) ); ?></label><br>
<input type="text" class="ta-field" id="<?php print $opt; ?>" name="<?php print $opt; ?>" value="<?php echo get_option( $opt ); ?>" /></p>
<?php
}

Expand Down

0 comments on commit d5fa127

Please sign in to comment.