Upgrade my wordpress plugin

i must upgrade my plugin but my programing skills i still is so bad.

I have small plugin which after the implementation add to my register form information about accept Term and Condition and when you click on it, they plugin will transfer you to site with information about Term and condition(adress site i must change in code). No i must upgrade my plugin. I need create panel on wp-admin where i can write URL site with Term and condition i make new panel but i dont know how make form for adres URL with option “Save”. I know my english i so bad but i trust you know what i mean. Ofcourse i send my code:

add_filter("wpjb_form_init_company", "mod_wpjb_tos_field");
add_filter("wpjr_form_init_register", "mod_wpjb_tos_field");

function mod_wpjb_tos_field($form) {

    if(is_admin() || $form instanceof Daq_Form_ObjectAbstract && !$form->isNew()) {
        return $form;

    // change terms-and-conditions to your ToS page slug,
    // or create a Page with slug terms-and-conditions
    $page = get_page_by_path("terms-and-conditions");

    if($page) {
        $url = get_permalink($page->ID);
    } else {
        $url = "#";

    $form->addGroup("tos", "Terms and Conditions");

    $e = $form->create("uterms", "checkbox");
    $e->setLabel(__("Terms And Conditions", "wpjobboard"));
    $e->addOption(1, 1, "I have read and agree to the <a href="$url">Terms and Conditions</a>.");
    $e->addFilter(new Daq_Filter_Int());
    $form->addElement($e, "tos");

    return $form;
 * Register a custom menu page.
function wpdocs_register_my_custom_menu_page(){
        __( 'Custom Menu Title', 'textdomain' ),
        'Term and condition',
        plugins_url( 'plugins/wpjb-tos/icon.png' ),
add_action( 'admin_menu', 'wpdocs_register_my_custom_menu_page' );

 * Display a custom menu page
function my_custom_menu_page(){
    esc_html_e( 'Admin Page Test', 'textdomain' );  

add_option( 'mod_wpjb_tos_field', '255', '', 'yes' ); 

/* Runs when plugin is activated */

/* Runs on plugin deactivation*/
register_deactivation_hook( __FILE__, 'Terms_condition_remove' );

function Terms_condition_install() {
/* Creates new database field */
add_option("Terms_condition_data", 'Default', '', 'yes');

function Terms_condition_remove() {
/* Deletes the database field */
function Terms__html_page() {
<h2>Hello World Options</h2>

<form method="post" action="options.php">
<?php wp_nonce_field('update-options'); ?>

<table width="510">
<tr valign="top">
<th width="92" scope="row">Enter Text</th>
<td width="406">
<input name="hello_world_data" type="text" id="hello_world_data"
value="<?php echo get_option('hello_world_data'); ?>" />
(ex. Hello World)</td>

<input type="hidden" name="action" value="update" />
<input type="hidden" name="page_options" value="hello_world_data" />

<input type="submit" value="<?php _e('Save Changes') ?>" />


Read more here: Upgrade my wordpress plugin

Leave a Reply

Your email address will not be published. Required fields are marked *