Skip to content

Instantly share code, notes, and snippets.

@sanzeeb3
Created August 12, 2021 06:13
Show Gist options
  • Save sanzeeb3/6a1773db9820cddf9438113df4afbefa to your computer and use it in GitHub Desktop.
Save sanzeeb3/6a1773db9820cddf9438113df4afbefa to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: Plugin Name
* Description: Creating plugin settings with React JS.
* Version: 1.0.0
* Author: Sanjeev Aryal
* Author URI: https://www.sanjeebaryal.com.np
* Text Domain: simplicity
* Domain Path: /languages/
*
*/
defined( 'ABSPATH' ) || exit;
add_action( 'admin_menu', 'prefix_register_settings_menu' );
function prefix_register_settings_menu() {
add_options_page( 'Plugin Settings', 'Plugin Name', 'manage_options', 'plugin-slug','plugin_settings_page' );
}
function plugin_settings_page() {
?>
<h2><?php esc_html_e( 'General Settings', 'plugin-text-domain' ); ?></h2>
<form method="post">
<table class="form-table">
<tr valign="top" class="plugin-slug-option">
<th scope="row"><?php echo esc_html__( 'One of the input type settings', 'plugin-text-domain' ); ?></th>
<td>
<input style="width:auto" type="text" name="input_type_settings" />
</td>
</tr>
</table>
<?php submit_button(); ?>
</form>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment