Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
justinh-rahb committed Mar 22, 2023
1 parent cc84dc0 commit 60f9a82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# OpenAI Moderation WordPress Plugin

This WordPress plugin filters input fields in text areas using the OpenAI Moderation API. It helps ensure that user-submitted content is respectful and allows you to
control which content classifications are allowed on your website.
This WordPress plugin filters input fields in text areas using the [OpenAI Moderation API](https://platform.openai.com/docs/guides/moderation/overview). It helps ensure that user-submitted content is respectful and allows you to control which content classifications are allowed on your website.

### Forever Free, No Pro Version

Expand All @@ -22,7 +21,7 @@ We’re proud to announce that this plugin will always be 100% free, with no pla

## Configuration

1. Obtain an OpenAI API key by signing up at https://beta.openai.com/signup/.
1. Obtain an OpenAI API key by signing up at https://beta.openai.com/signup/ and going to this page https://platform.openai.com/account/api-keys.
2. Go to the 'Settings' > 'OpenAI Moderation' screen in your WordPress admin area.
3. Enter your OpenAI API key in the 'OpenAI API Key' field.
4. Select the content categories you want to allow in the 'Allowed Classifications' field.
Expand Down
11 changes: 6 additions & 5 deletions openai-moderation.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
/*
Plugin Name: OpenAI Moderation
Plugin URI: https://github.com/RAHB-REALTORS-Association/openai-moderation-wp
Description: A simple plugin that filters input fields in text areas using the OpenAI Moderation API.
Plugin URI: https://github.com/RAHB-REALTORS-Association/OpenAI-Moderation-WP
Description: A simple plugin that filters input fields in text areas using the <a href="https://platform.openai.com/docs/guides/moderation/overview" target="_blank">OpenAI Moderation API</a>.
Version: 1.0.1
Author: RAHB
Author URI: https://www.rahb.ca/
Author URI: https://github.com/RAHB-REALTORS-Association
License: GPLv2
Text Domain: openai-moderation
*/
Expand Down Expand Up @@ -75,7 +75,8 @@ public function settings_page() {
<label for="openai_api_key"><?php _e('OpenAI API Key', 'openai-moderation'); ?></label>
</th>
<td>
<input type="text" name="openai_api_key" id="openai_api_key" value="<?php echo esc_attr(get_option('openai_api_key')); ?>" />
<input type="text" name="openai_api_key" id="openai_api_key" value="<?php echo esc_attr(get_option('openai_api_key')); ?>" /><br />
<p>You can obtain an API key <a href="https://platform.openai.com/account/api-keys" target="_blank">here</a>.</p>
</td>
</tr>
<tr>
Expand All @@ -94,7 +95,7 @@ public function settings_page() {
</th>
<td>
<input type="checkbox" name="openai_plugin_enabled" id="openai_plugin_enabled" value="1" <?php checked(1, get_option('openai_plugin_enabled'), true); ?> />
<label for="openai_plugin_enabled"><?php _e('Enable OpenAI Moderation', 'openai-moderation'); ?></label>
<label for="openai_plugin_enabled"><?php _e('Enable Moderation', 'openai-moderation'); ?></label>
</td>
</tr>
</table>
Expand Down

0 comments on commit 60f9a82

Please sign in to comment.