feat: Register plugin settings with WordPress
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* Plugin Name: SitiAI Product Teksten
|
* Plugin Name: SitiAI Product Teksten
|
||||||
* Description: Genereer productteksten met diverse AI-aanbieders rechtstreeks vanuit WooCommerce.
|
* Description: Genereer productteksten met diverse AI-aanbieders rechtstreeks vanuit WooCommerce.
|
||||||
* Version: 1.6.1
|
* Version: 1.6.2
|
||||||
* Author: SitiAI
|
* Author: SitiAI
|
||||||
* Text Domain: siti-ai-product-content-generator
|
* Text Domain: siti-ai-product-content-generator
|
||||||
* Domain Path: /languages
|
* Domain Path: /languages
|
||||||
|
|||||||
@@ -86,6 +86,17 @@ class Groq_AI_Product_Text_Settings_Page {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Register plugin settings with WordPress.
|
||||||
|
*/
|
||||||
|
public function register_settings() {
|
||||||
|
register_setting(
|
||||||
|
$this->plugin->get_option_key(),
|
||||||
|
$this->plugin->get_option_key(),
|
||||||
|
[ $this->plugin, 'sanitize_settings' ]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function hide_menu_links() {
|
public function hide_menu_links() {
|
||||||
if ( ! current_user_can( 'manage_options' ) ) {
|
if ( ! current_user_can( 'manage_options' ) ) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user