Skip to content

Commit

Permalink
Remove settings link from plugin page listing
Browse files Browse the repository at this point in the history
  • Loading branch information
justinh-rahb committed Mar 25, 2023
1 parent 3d96c8c commit a7d32e1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
10 changes: 0 additions & 10 deletions openai-moderation/includes/openai-moderation-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ public function __construct()
// Register the settings submenu and settings.
add_action('admin_menu', [$this, 'register_settings_submenu']);
add_action('admin_init', [$this, 'register_settings']);
// Add settings link to the plugin page.
add_filter('plugin_action_links_' . plugin_basename(OPENAI_MODERATION_PLUGIN_FILE), [$this, 'add_settings_link']);
}

// Register the settings submenu under the "Settings" menu in the admin area.
Expand All @@ -21,14 +19,6 @@ public function register_settings_submenu()
[$this, 'settings_page']
);
}

// Add settings link to the plugin page.
public function add_settings_link($links)
{
$settings_link = '<a href="options-general.php?page=openai-moderation">' . __('Settings', 'openai-moderation') . '</a>';
array_unshift($links, $settings_link);
return $links;
}

// Register the plugin's settings.
public function register_settings()
Expand Down
1 change: 0 additions & 1 deletion openai-moderation/openai-moderation.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
// Define the plugin path.
define('OPENAI_MODERATION_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('OPENAI_MODERATION_PLUGIN_URL', plugin_dir_url(__FILE__));
define('OPENAI_MODERATION_PLUGIN_FILE', __FILE__);

// Include the plugin's files.
require_once OPENAI_MODERATION_PLUGIN_DIR . 'includes/openai-moderation-settings.php';
Expand Down

0 comments on commit a7d32e1

Please sign in to comment.